From 2e5bea970a21385daffde44d0479eb4b90099c0e Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Fri, 16 Jun 2023 18:55:51 +0800 Subject: [PATCH] update version --- backend/build.gradle | 10 +++++----- backend/grepcp.list | 10 +++++++--- .../java/org/bdware/sc/contractexample/Hello.java | 12 +++++++++++- bdserver-docker-compose/.gitignore | 6 ++++++ 4 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 bdserver-docker-compose/.gitignore diff --git a/backend/build.gradle b/backend/build.gradle index 92a6b18..01227d9 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -3,8 +3,8 @@ buildscript { mavenCentral() } dependencies { - classpath "org.bdware.bdcontract:simple-ypk-packer:0.5.5" - classpath "org.bdware.bdcontract:ypk-deploy-tool:0.7.1" + classpath "org.bdware.bdcontract:simple-ypk-packer:0.6.0" + classpath "org.bdware.bdcontract:ypk-deploy-tool:0.7.4" } } plugins { @@ -39,7 +39,7 @@ sourceSets { dependencies { api 'org.apache.logging.log4j:log4j-core:2.17.2' api 'org.apache.logging.log4j:log4j-api:2.17.2' - implementation 'org.bdware.sc:cp:1.8.0' + implementation 'org.bdware.sc:cp:1.9.1' testImplementation 'junit:junit:4.13.2' } @@ -77,10 +77,10 @@ task copyJar(type: Copy, dependsOn: [":backend:jar", ":backend:copyLibs"]) { } def reltivePath = "./backend" //reltivePath="." -def currVersion = "1.3.3" +def currVersion = "1.3.4" task grepCP(dependsOn: ["copyJar"]) { doLast { - org.bdware.datanet.YPKPacker.grepJarByCPVersion("${reltivePath}/build/output/libs", org.bdware.datanet.CPVersion.cp_1_6_8) + org.bdware.datanet.YPKPacker.grepJarByCPVersion("${reltivePath}/build/output/libs", org.bdware.datanet.CPVersion.cp_1_8_3) org.bdware.datanet.YPKPacker.grepJarByListFile("${reltivePath}/build/output/libs", "${reltivePath}/grepcp.list") } diff --git a/backend/grepcp.list b/backend/grepcp.list index 1498756..76f63e9 100644 --- a/backend/grepcp.list +++ b/backend/grepcp.list @@ -1,3 +1,7 @@ -common-1.5.9.jar -cp-1.6.4.jar -rocksdbjni-7.3.1.jar \ No newline at end of file +sdk-java-1.0.2.jar +common-1.7.5.jar +cp-1.9.1.jar +delta-crdts-1.1.0.jar +doip-audit-tool-1.2.9.jar +doip-sdk-1.4.6.jar +irp-sdk-1.1.6.jar \ No newline at end of file diff --git a/backend/src/main/java/org/bdware/sc/contractexample/Hello.java b/backend/src/main/java/org/bdware/sc/contractexample/Hello.java index eca9a29..cedaada 100644 --- a/backend/src/main/java/org/bdware/sc/contractexample/Hello.java +++ b/backend/src/main/java/org/bdware/sc/contractexample/Hello.java @@ -1,11 +1,19 @@ package org.bdware.sc.contractexample; +import com.google.gson.JsonObject; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.bdware.sc.ContractProcess; import org.bdware.sc.boundry.JavaScriptEntry; +import org.bdware.sc.engine.JSONTool; +import wrp.jdk.nashorn.api.scripting.ScriptObjectMirror; public class Hello { + public static String call(ScriptObjectMirror obj) { + JsonObject jo = JSONTool.convertMirrorToJson(obj).getAsJsonObject(); + //... + return "0320-hello"; + } private static final Logger LOGGER = LogManager.getLogger(Hello.class); public static void main(String[] args) { @@ -13,9 +21,11 @@ public class Hello { } public static String call() { - return "hello..dafdskf"; + return "0320-hello"; } + + public static String callYJSInSameCP() { return ContractProcess.instance.executeContract("{\"action\":\"getOwner\"\",\"arg\":\"\"}"); } diff --git a/bdserver-docker-compose/.gitignore b/bdserver-docker-compose/.gitignore new file mode 100644 index 0000000..86c4380 --- /dev/null +++ b/bdserver-docker-compose/.gitignore @@ -0,0 +1,6 @@ +./bdcontract/BDWareProjectDir +./bdcontract/ContractDB +./bdcontract/ContractManagerDB +./bdcontract/rocksdb +./bdcontract/tls +./bdledger/data \ No newline at end of file