diff --git a/backend/build.gradle b/backend/build.gradle old mode 100644 new mode 100755 index ac97704..291af35 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -1,6 +1,11 @@ buildscript { + repositories{ + mavenCentral() + mavenLocal() + } dependencies { - classpath files("buildlibs/simpleypkpacker.jar") + classpath "org.bdware.bdcontract:simple-ypk-packer:0.3.0" + classpath "org.bdware.bdcontract:ypk-deploy-tool:0.4.0" } } @@ -34,15 +39,25 @@ sourceSets { } dependencies { - api 'org.apache.logging.log4j:log4j-core:2.14.1' - api 'org.apache.logging.log4j:log4j-api:2.14.1' +// api 'org.apache.logging.log4j:log4j-core:2.14.1' +// api 'org.apache.logging.log4j:log4j-api:2.14.1' implementation fileTree(dir: 'cplibs', include: '*.jar') - implementation fileTree(dir: 'cplibs/lib/', include: '*.jar') +// implementation fileTree(dir: 'cplibs/lib/', include: '*.jar') testImplementation 'junit:junit:4.13.2' +// api project(":datanet-search-engine-backend") + implementation 'org.postgresql:postgresql:42.3.1' } -task copyLibs(type: Copy) { +//task copyLibs(type: Copy) { +// from configurations.runtimeClasspath +// into "./build/output/libs/" +//} + +task copyLibs(type: Copy ) { from configurations.runtimeClasspath + exclude { + details-> details.file.getAbsolutePath().contains("cplibs") + } into "./build/output/libs/" } @@ -79,12 +94,18 @@ task copyJar(type: Copy, dependsOn: ["mergeJar", ":backend:copyLibs"]) { task buildZip(type: Zip, dependsOn: ["copyAssets", "copyJar", "copyYJS"]) { from './build/output/' duplicatesStrategy = DuplicatesStrategy.INCLUDE - archiveFileName = 'contractexample.zip' + archiveFileName = 'registry.zip' destinationDirectory = file('build/') } - +def currVersion = "0.0.1" task buildYPK(dependsOn: ["buildZip"]) { doLast { - org.bdware.datanet.YPKPacker.staticPack("./backend/build/contractexample.zip", "./backend/build/contractexample.ypk") + org.bdware.datanet.YPKPacker.staticPack("./backend/build/registry.zip", "./backend/build/registry${currVersion}.ypk") } } + +task deploy(dependsOn: ["buildYPK"]){ + doLast { + org.bdware.ypkdeploy.HTTPTool.batchRun("./backend/deployconfig.json", true) + } +} \ No newline at end of file