feat: add admin at onCreate
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
buildscript {
|
||||
repositories{
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.bdware.bdcontract:simple-ypk-packer:0.3.0"
|
||||
classpath "org.bdware.bdcontract:ypk-deploy-tool:0.4.0"
|
||||
classpath 'org.apache.logging.log4j:log4j-core:2.17.2'
|
||||
classpath 'org.apache.logging.log4j:log4j-api:2.17.2'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +41,8 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// 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/libs/', include: '*.jar')
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
// api project(":datanet-search-engine-backend")
|
||||
implementation 'org.postgresql:postgresql:42.3.1'
|
||||
@@ -52,12 +52,15 @@ dependencies {
|
||||
// from configurations.runtimeClasspath
|
||||
// into "./build/output/libs/"
|
||||
//}
|
||||
|
||||
task copyLibs(type: Copy ) {
|
||||
from configurations.runtimeClasspath
|
||||
exclude {
|
||||
details-> details.file.getAbsolutePath().contains("cplibs")
|
||||
def reltivePath = "./backend"
|
||||
task grepCP(dependsOn: ["copyLibs"]) {
|
||||
doLast {
|
||||
org.bdware.datanet.YPKPacker.grepCPLibWithFilter("${reltivePath}/cplibs/libs", "${reltivePath}/build/output/libs", "${reltivePath}/grepcp.list")
|
||||
}
|
||||
}
|
||||
|
||||
task copyLibs(type: Copy) {
|
||||
from configurations.runtimeClasspath
|
||||
into "./build/output/libs/"
|
||||
}
|
||||
|
||||
@@ -74,37 +77,31 @@ task copyAssets(type: Copy) {
|
||||
from "../front"
|
||||
into "./build/output/assets/"
|
||||
}
|
||||
task mergeJar(dependsOn: ["sourcesJar", "jar"]) {
|
||||
doLast {
|
||||
org.bdware.datanet.YPKPacker.mergeJar("./backend/build/libs/$project.name-${project.version}.jar",
|
||||
"./backend/build/libs/$project.name-${project.version}-sources.jar",
|
||||
"./backend/build/libs/$project.name-${project.version}-all.jar")
|
||||
}
|
||||
}
|
||||
|
||||
task copyJar(type: Copy, dependsOn: ["mergeJar", ":backend:copyLibs"]) {
|
||||
from "./build/libs/$project.name-${project.version}-all.jar"
|
||||
into "./build/output"
|
||||
rename { String fileName -> "sc-example.jar" }
|
||||
def currVersion = "0.0.4"
|
||||
task copyJar(type: Copy, dependsOn: [":backend:copyLibs",":backend:jar"]) {
|
||||
from "./build/libs/$project.name-${project.version}.jar"
|
||||
into "./build/output/libs"
|
||||
rename { String fileName -> "registry-${currVersion}.jar" }
|
||||
doFirst {
|
||||
println "copyJar start"
|
||||
}
|
||||
}
|
||||
|
||||
task buildZip(type: Zip, dependsOn: ["copyAssets", "copyJar", "copyYJS"]) {
|
||||
task buildZip(type: Zip, dependsOn: ["copyAssets", "copyJar", "copyYJS", "grepCP"]) {
|
||||
from './build/output/'
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
archiveFileName = 'registry.zip'
|
||||
destinationDirectory = file('build/')
|
||||
}
|
||||
def currVersion = "0.0.1"
|
||||
|
||||
task buildYPK(dependsOn: ["buildZip"]) {
|
||||
doLast {
|
||||
org.bdware.datanet.YPKPacker.staticPack("./backend/build/registry.zip", "./backend/build/registry${currVersion}.ypk")
|
||||
org.bdware.datanet.YPKPacker.staticPack("./backend/build/registry.zip", "./backend/build/registry-${currVersion}.ypk")
|
||||
}
|
||||
}
|
||||
|
||||
task deploy(dependsOn: ["buildYPK"]){
|
||||
task deploy(dependsOn: ["buildYPK"]) {
|
||||
doLast {
|
||||
org.bdware.ypkdeploy.HTTPTool.batchRun("./backend/deployconfig.json", true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user