upgrade version

This commit is contained in:
CaiHQ 2023-09-19 14:22:03 +08:00
parent 2e5bea970a
commit d7dcbdab52
4 changed files with 31 additions and 24 deletions

View File

@ -3,7 +3,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath "org.bdware.bdcontract:simple-ypk-packer:0.6.0" classpath "org.bdware.bdcontract:simple-ypk-packer:0.6.3"
classpath "org.bdware.bdcontract:ypk-deploy-tool:0.7.4" classpath "org.bdware.bdcontract:ypk-deploy-tool:0.7.4"
} }
} }
@ -11,12 +11,14 @@ plugins {
id 'java' id 'java'
id 'java-library' id 'java-library'
} }
def moduleName = "backend"
def relativePath = "./${moduleName}"
def currVersion = "1.3.6"
def appName = "contract-java-example"
tasks.withType(JavaCompile) { tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:none' options.compilerArgs << '-Xlint:none'
options.compilerArgs << '-Xlint:deprecation' << "-Werror" options.compilerArgs << '-Xlint:deprecation' << "-Werror"
} }
sourceSets { sourceSets {
main { main {
java { java {
@ -39,7 +41,7 @@ sourceSets {
dependencies { dependencies {
api 'org.apache.logging.log4j:log4j-core:2.17.2' api 'org.apache.logging.log4j:log4j-core:2.17.2'
api 'org.apache.logging.log4j:log4j-api:2.17.2' api 'org.apache.logging.log4j:log4j-api:2.17.2'
implementation 'org.bdware.sc:cp:1.9.1' implementation 'org.bdware.sc:cp:1.9.9'
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
} }
@ -67,21 +69,18 @@ task copyAssets(type: Copy) {
into "./build/output/assets/" into "./build/output/assets/"
} }
task copyJar(type: Copy, dependsOn: [":backend:jar", ":backend:copyLibs"]) { task copyJar(type: Copy, dependsOn: [":${moduleName}:jar", ":${moduleName}:copyLibs"]) {
from "./build/libs/$project.name-${project.version}.jar" from "./build/libs/${moduleName}.jar"
into "./build/output" into "./build/output"
rename { String fileName -> "sc-example.jar" } rename { String fileName -> "${appName}.jar" }
doFirst { doFirst {
println "copyJar start" println "copyJar start"
} }
} }
def reltivePath = "./backend"
//reltivePath="."
def currVersion = "1.3.4"
task grepCP(dependsOn: ["copyJar"]) { task grepCP(dependsOn: ["copyJar"]) {
doLast { doLast {
org.bdware.datanet.YPKPacker.grepJarByCPVersion("${reltivePath}/build/output/libs", org.bdware.datanet.CPVersion.cp_1_8_3) org.bdware.datanet.YPKPacker.grepJarByCPVersion("${relativePath}/build/output/libs", org.bdware.datanet.CPVersion.cp_1_9_0)
org.bdware.datanet.YPKPacker.grepJarByListFile("${reltivePath}/build/output/libs", "${reltivePath}/grepcp.list") org.bdware.datanet.YPKPacker.grepJarByListFile("${relativePath}/build/output/libs", "${relativePath}/grepcp.list")
} }
} }
@ -91,18 +90,18 @@ tasks.processTestResources.setDuplicatesStrategy(DuplicatesStrategy.INCLUDE)
task buildZip(type: Zip, dependsOn: ["copyAssets", "copyJar", "copyYJS", "grepCP", "copyFront"]) { task buildZip(type: Zip, dependsOn: ["copyAssets", "copyJar", "copyYJS", "grepCP", "copyFront"]) {
from './build/output/' from './build/output/'
duplicatesStrategy = DuplicatesStrategy.INCLUDE duplicatesStrategy = DuplicatesStrategy.INCLUDE
archiveFileName = 'contractexample.zip' archiveFileName = "${appName}.zip"
destinationDirectory = file('build/') destinationDirectory = file('build/')
} }
task buildYPK(dependsOn: ["buildZip"]) { task buildYPK(dependsOn: ["buildZip"]) {
doLast { doLast {
org.bdware.datanet.YPKPacker.staticPack("${reltivePath}/build/contractexample.zip", "${reltivePath}/build/contractexample-${currVersion}.ypk") org.bdware.datanet.YPKPacker.staticPack("${relativePath}/build/${appName}.zip", "${relativePath}/build/${appName}-${currVersion}.ypk")
} }
} }
task deploy(dependsOn: ["buildYPK"]) { task deploy(dependsOn: ["buildYPK"]) {
doLast { doLast {
org.bdware.ypkdeploy.HTTPTool.deployWithYpk("${reltivePath}/debugconf.json", "${reltivePath}/build/contractexample-${currVersion}.ypk") org.bdware.ypkdeploy.HTTPTool.deployWithYpk("${relativePath}/debugconf.json", "${relativePath}/build/${appName}-${currVersion}.ypk")
} }
} }

View File

@ -1,7 +1,10 @@
sdk-java-1.0.2.jar checker-qual-3.31.0.jar
common-1.7.5.jar common-1.7.9.jar
cp-1.9.1.jar cp-1.9.9.jar
delta-crdts-1.1.0.jar delta-crdts-1.2.0.jar
doip-audit-tool-1.2.9.jar doip-audit-tool-1.3.6.jar
doip-sdk-1.4.6.jar doip-sdk-1.4.9.jar
irp-sdk-1.1.6.jar gson-2.10.1.jar
mysql-connector-j-8.0.33.jar
postgresql-42.6.0.jar
protobuf-java-3.21.9.jar

View File

@ -2,7 +2,8 @@ plugins {
id 'java' id 'java'
id 'idea' id 'idea'
} }
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
tasks.withType(JavaCompile) { tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:none' options.compilerArgs << '-Xlint:none'
options.compilerArgs << '-Xlint:deprecation' << "-Werror" options.compilerArgs << '-Xlint:deprecation' << "-Werror"
@ -15,6 +16,5 @@ project(':backend') {
group = "org.bdware.sc.example" group = "org.bdware.sc.example"
repositories { repositories {
mavenCentral() mavenCentral()
maven { url 'https://maven.aliyun.com/repository/public' }
} }
} }

View File

@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists