From 588f465f486b1053ac621053e8919ab56a4e25ae Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Wed, 17 May 2023 15:37:27 +0300 Subject: [PATCH 1/7] update gradle --- build.gradle | 12 ++++++------ gradle/jacoco/build.gradle | 2 +- gradle/java/build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- logs | 12 ++++++++++++ .../console/openapi/subcommands/JarOpenApiCommand.kt | 2 +- 6 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 logs diff --git a/build.gradle b/build.gradle index b5626ed..be8fbaf 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ import java.text.SimpleDateFormat plugins { - id 'org.jetbrains.kotlin.jvm' version '1.3.72' + id 'org.jetbrains.kotlin.jvm' version '1.6.21' id "application" id "distribution" id "idea" @@ -19,8 +19,8 @@ mainClassName = 'org.web3j.console.Web3j' applicationName = 'web3j' ext { - web3jVersion = '4.9.4' - picocli = '4.6.0' + web3jVersion = '4.10.0' + picocli = '4.7.3' slf4jVersion = '1.7.30' junitVersion = '5.8.2' mockitoVersion = '4.1.0' @@ -153,13 +153,13 @@ sourceSets { } compileKotlin { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = "17" } compileTestKotlin { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = "17" } -sourceCompatibility = 1.8 +sourceCompatibility = 17 def generatedResources = "$buildDir/generated-resources/main" diff --git a/gradle/jacoco/build.gradle b/gradle/jacoco/build.gradle index 8e568d0..fb9fb7d 100644 --- a/gradle/jacoco/build.gradle +++ b/gradle/jacoco/build.gradle @@ -26,6 +26,6 @@ task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { } jacoco { - toolVersion = "0.8.4" + toolVersion = "0.8.10" } diff --git a/gradle/java/build.gradle b/gradle/java/build.gradle index df9a754..bdb987d 100644 --- a/gradle/java/build.gradle +++ b/gradle/java/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'java' -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +sourceCompatibility = 17 +targetCompatibility = 17 compileJava { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5292e6c..06c0967 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip diff --git a/logs b/logs new file mode 100644 index 0000000..cb557c7 --- /dev/null +++ b/logs @@ -0,0 +1,12 @@ + +FAILURE: Build failed with an exception. + +* What went wrong: +Could not initialize class org.codehaus.groovy.runtime.InvokerHelper + +* Try: +Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. + +* Get more help at https://help.gradle.org + +BUILD FAILED in 5s diff --git a/src/main/kotlin/org/web3j/console/openapi/subcommands/JarOpenApiCommand.kt b/src/main/kotlin/org/web3j/console/openapi/subcommands/JarOpenApiCommand.kt index d86e234..5fe0dc1 100644 --- a/src/main/kotlin/org/web3j/console/openapi/subcommands/JarOpenApiCommand.kt +++ b/src/main/kotlin/org/web3j/console/openapi/subcommands/JarOpenApiCommand.kt @@ -54,7 +54,7 @@ class JarOpenApiCommand : AbstractOpenApiCommand() { * Path to the `.web3j` folder */ private val web3jHomeFolder: Path = - Paths.get(System.getenv(if (System.getProperty("os.name").toLowerCase().startsWith("win")) "USERPROFILE" else "HOME"), ".web3j") + Paths.get(System.getenv(if (System.getProperty("os.name").lowercase().startsWith("win")) "USERPROFILE" else "HOME"), ".web3j") override fun generate(projectFolder: File) { if (solidityImportPath == null) { From 4d90e79111cafb1e8e674372995905fdecada2b9 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Mon, 12 Jun 2023 11:31:32 +0300 Subject: [PATCH 2/7] update proj --- build.gradle | 8 +++-- gradle.properties | 2 +- gradle/repositories/build.gradle | 1 + .../project/java/Erc20JavaProjectCreator.java | 2 +- .../java/Erc777JavaProjectCreator.java | 2 +- .../console/project/java/JavaProject.java | 4 +-- .../console/project/kotlin/KotlinProject.java | 4 +-- .../resources/project/Dockerfile.template | 4 +-- .../resources/project/build.gradle.template | 33 +++++++++++++++---- .../build.gradleGenerateOpenApi.template | 3 +- .../project/build.gradleImport.template | 33 ++++++++++++++++--- .../project/build.gradleImportJava11.template | 27 +++++++++++++-- .../build.gradleImportOpenApi.template | 3 +- .../project/build.gradleJarOpenApi.template | 3 +- .../project/build.gradleJava11.template | 26 +++++++++++++-- .../project/build.gradleOpenApi.template | 3 +- .../project/erc20/build.gradleErc20.template | 33 +++++++++++++++---- .../erc20/build.gradleErc20Java11.template | 27 ++++++++++++--- .../erc20/build.gradleOpenApiErc20.template | 3 +- .../erc777/build.gradleErc777.template | 13 ++++---- .../erc777/build.gradleErc777Java11.template | 7 ++-- .../erc777/build.gradleOpenApiErc777.template | 2 +- .../gradlew-wrapper.properties.template | 2 +- .../project/settings.gradle.template | 6 ++++ .../console/openapi/OpenApiProjectTest.kt | 4 ++- 25 files changed, 198 insertions(+), 57 deletions(-) diff --git a/build.gradle b/build.gradle index be8fbaf..cb65737 100644 --- a/build.gradle +++ b/build.gradle @@ -19,8 +19,8 @@ mainClassName = 'org.web3j.console.Web3j' applicationName = 'web3j' ext { - web3jVersion = '4.10.0' - picocli = '4.7.3' + web3jVersion = '4.10.1-RC' + picocli = '4.6.0' slf4jVersion = '1.7.30' junitVersion = '5.8.2' mockitoVersion = '4.1.0' @@ -61,6 +61,7 @@ apply { repositories { jcenter() mavenCentral() + mavenLocal() maven { url "https://dl.bintray.com/ethereum/maven/" } maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } maven { url 'https://repo.gradle.org/gradle/libs-releases' } @@ -179,3 +180,6 @@ task generateVersionProperties { generated.append("timestamp=${System.currentTimeMillis()}\n") } } + +tasks.named("spotlessJava").configure { dependsOn("javadoc","sourcesJar","compileTestJava","compileTestKotlin") } +tasks.named("spotlessKotlin").configure { dependsOn("compileKotlin","sourcesJar","compileTestKotlin") } diff --git a/gradle.properties b/gradle.properties index 2bc39a2..af5380b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version=1.4.2 +version=1.5.0-RC group=org.web3j.console diff --git a/gradle/repositories/build.gradle b/gradle/repositories/build.gradle index 350db19..e7581f6 100644 --- a/gradle/repositories/build.gradle +++ b/gradle/repositories/build.gradle @@ -1,4 +1,5 @@ repositories { + mavenLocal() mavenCentral() jcenter() maven { url 'https://oss.sonatype.org/content/repositories/releases/' } diff --git a/src/main/java/org/web3j/console/project/java/Erc20JavaProjectCreator.java b/src/main/java/org/web3j/console/project/java/Erc20JavaProjectCreator.java index 5c64561..695c2c9 100644 --- a/src/main/java/org/web3j/console/project/java/Erc20JavaProjectCreator.java +++ b/src/main/java/org/web3j/console/project/java/Erc20JavaProjectCreator.java @@ -52,7 +52,7 @@ protected void createProject() { .withWrapperGradleSettings("project/gradlew-wrapper.properties.template") .withGradlewWrapperJar("gradle-wrapper.jar") .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() < 11 + JavaVersion.getJavaVersionAsDouble() > 11 ? "project/erc20/build.gradleErc20.template" : "project/erc20/build.gradleErc20Java11.template") .withMainJavaClass("project/erc20/JavaErc20.template") diff --git a/src/main/java/org/web3j/console/project/java/Erc777JavaProjectCreator.java b/src/main/java/org/web3j/console/project/java/Erc777JavaProjectCreator.java index 417c484..cbe493d 100644 --- a/src/main/java/org/web3j/console/project/java/Erc777JavaProjectCreator.java +++ b/src/main/java/org/web3j/console/project/java/Erc777JavaProjectCreator.java @@ -53,7 +53,7 @@ protected void createProject() { .withWrapperGradleSettings("project/gradlew-wrapper.properties.template") .withGradlewWrapperJar("gradle-wrapper.jar") .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() < 11 + JavaVersion.getJavaVersionAsDouble() > 11 ? "project/erc777/build.gradleErc777.template" : "project/erc777/build.gradleErc777Java11.template") .withMainJavaClass("project/erc777/JavaErc777.template") diff --git a/src/main/java/org/web3j/console/project/java/JavaProject.java b/src/main/java/org/web3j/console/project/java/JavaProject.java index b078ba1..43408fb 100644 --- a/src/main/java/org/web3j/console/project/java/JavaProject.java +++ b/src/main/java/org/web3j/console/project/java/JavaProject.java @@ -59,7 +59,7 @@ public JavaTemplateProvider getTemplateProvider() { if (command.equals("new")) { templateBuilder .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() < 11 + JavaVersion.getJavaVersionAsDouble() > 11 ? "project/build.gradle.template" : "project/build.gradleJava11.template") .withSolidityProject("contracts/HelloWorld.sol"); @@ -67,7 +67,7 @@ public JavaTemplateProvider getTemplateProvider() { } else if (command.equals("import")) { templateBuilder .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() < 11 + JavaVersion.getJavaVersionAsDouble() > 11 ? "project/build.gradleImport.template" : "project/build.gradleImportJava11.template") .withPathToSolidityFolder(solidityImportPath); diff --git a/src/main/java/org/web3j/console/project/kotlin/KotlinProject.java b/src/main/java/org/web3j/console/project/kotlin/KotlinProject.java index 46efaa3..e283317 100644 --- a/src/main/java/org/web3j/console/project/kotlin/KotlinProject.java +++ b/src/main/java/org/web3j/console/project/kotlin/KotlinProject.java @@ -60,7 +60,7 @@ public KotlinTemplateProvider getTemplateProvider() { if (command.equals("new")) { templateBuilder .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() < 11 + JavaVersion.getJavaVersionAsDouble() > 11 ? "project/build.gradle.template" : "project/build.gradleJava11.template") .withSolidityProject("contracts/HelloWorld.sol"); @@ -68,7 +68,7 @@ public KotlinTemplateProvider getTemplateProvider() { } else if (command.equals("import")) { templateBuilder .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() < 11 + JavaVersion.getJavaVersionAsDouble() > 11 ? "project/build.gradleImport.template" : "project/build.gradleImportJava11.template") .withPathToSolidityFolder(solidityImportPath); diff --git a/src/main/resources/project/Dockerfile.template b/src/main/resources/project/Dockerfile.template index cd028ac..2dba472 100644 --- a/src/main/resources/project/Dockerfile.template +++ b/src/main/resources/project/Dockerfile.template @@ -2,7 +2,7 @@ FROM ubuntu as Build COPY . /root/app RUN apt-get update && apt-get install -y \ - curl bash openjdk-11-jre \ + curl bash openjdk-17-jre \ && rm -rf /var/cache/apk/* \ && curl -L get.web3j.io | sh \ && /root/.web3j/web3j \ @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y \ FROM alpine COPY --from=Build /root /root/ -RUN apk add --no-cache bash openjdk11-jre\ +RUN apk add --no-cache bash openjdk17-jre\ && rm -rf /var/cache/apk/* \ && mkdir /opt/app WORKDIR /root/app diff --git a/src/main/resources/project/build.gradle.template b/src/main/resources/project/build.gradle.template index fa3eec7..7b7c670 100644 --- a/src/main/resources/project/build.gradle.template +++ b/src/main/resources/project/build.gradle.template @@ -1,23 +1,23 @@ plugins { id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.3.61' + id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.9.4' + id 'org.web3j' version '4.10.1-RC' } group '' version '0.1.0' -sourceCompatibility = 1.8 +sourceCompatibility = 17 repositories { + mavenLocal() mavenCentral() maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" } maven { url "https://artifacts.consensys.net/public/maven/maven/" } maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" } - maven { url "https://dl.cloudsmith.io/public/consensys/quorum-mainnet-launcher/maven/"} } web3j { @@ -30,9 +30,13 @@ node { } ext { - web3jVersion = '4.9.4' + web3jVersion = '4.10.1-RC' logbackVersion = '1.2.3' klaxonVersion = '5.5' + besuPluginVersion = '23.4.0' + besuInternalVersion = '23.4.0' + besuInternalCryptoVersion = '23.1.3' + besuCryptoDepVersion = '0.7.1' } dependencies { @@ -45,6 +49,21 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' + + implementation "org.hyperledger.besu:plugin-api:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:besu:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:api:$besuInternalVersion" + implementation "org.hyperledger.besu:evm:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:config:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:crypto:$besuInternalCryptoVersion" + implementation "org.hyperledger.besu.internal:rlp:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:kvstore:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:metrics-core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:trie:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:util:$besuInternalVersion" + implementation "org.hyperledger.besu:bls12-381:$besuCryptoDepVersion" + implementation "org.hyperledger.besu:secp256k1:$besuCryptoDepVersion" } jar { @@ -65,11 +84,11 @@ test { } compileKotlin { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = "17" } compileTestKotlin { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = "17" } diff --git a/src/main/resources/project/build.gradleGenerateOpenApi.template b/src/main/resources/project/build.gradleGenerateOpenApi.template index ce2d3ab..b3b0276 100644 --- a/src/main/resources/project/build.gradleGenerateOpenApi.template +++ b/src/main/resources/project/build.gradleGenerateOpenApi.template @@ -1,11 +1,12 @@ plugins { - id "org.web3j.openapi" version "4.9.4" + id "org.web3j.openapi" version "4.10.1-RC" } group '' version '1.0-SNAPSHOT' repositories { + mavenLocal() mavenCentral() } diff --git a/src/main/resources/project/build.gradleImport.template b/src/main/resources/project/build.gradleImport.template index 16e5220..0fa3681 100644 --- a/src/main/resources/project/build.gradleImport.template +++ b/src/main/resources/project/build.gradleImport.template @@ -1,19 +1,23 @@ plugins { id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.3.61' + id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.9.4' + id 'org.web3j' version '4.10.1-RC' } group '' version '0.1.0' -sourceCompatibility = 1.8 +sourceCompatibility = 17 repositories { + mavenLocal() mavenCentral() + maven { url "https://hyperledger.jfrog.io/artifactory/besu-maven/" } + maven { url "https://artifacts.consensys.net/public/maven/maven/" } + maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" } jcenter() } @@ -26,9 +30,13 @@ node { } ext { - web3jVersion = '4.9.4' + besuPluginVersion = '23.4.0' + besuInternalVersion = '23.4.0' + besuInternalCryptoVersion = '23.1.3' + web3jVersion = '4.10.1-RC' logbackVersion = '1.2.3' klaxonVersion = '5.5' + besuCryptoDepVersion = '0.7.1' } dependencies { @@ -41,6 +49,21 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' + + implementation "org.hyperledger.besu:plugin-api:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:besu:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:api:$besuInternalVersion" + implementation "org.hyperledger.besu:evm:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:config:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:crypto:$besuInternalCryptoVersion" + implementation "org.hyperledger.besu.internal:rlp:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:kvstore:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:metrics-core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:trie:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:util:$besuInternalVersion" + implementation "org.hyperledger.besu:bls12-381:$besuCryptoDepVersion" + implementation "org.hyperledger.besu:secp256k1:$besuCryptoDepVersion" } jar { @@ -61,7 +84,7 @@ test { } compileTestKotlin { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = "17" } diff --git a/src/main/resources/project/build.gradleImportJava11.template b/src/main/resources/project/build.gradleImportJava11.template index 4385af6..dfabc25 100644 --- a/src/main/resources/project/build.gradleImportJava11.template +++ b/src/main/resources/project/build.gradleImportJava11.template @@ -1,9 +1,9 @@ plugins { id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.3.61' + id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.9.4' + id 'org.web3j' version '4.10.1-RC' } group '' @@ -12,6 +12,7 @@ version '0.1.0' sourceCompatibility = 11 repositories { + mavenLocal() mavenCentral() maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" } maven { url "https://artifacts.consensys.net/public/maven/maven/" } @@ -28,9 +29,14 @@ node { } ext { - web3jVersion = '4.9.4' + besuPluginVersion = '23.4.0' + besuInternalVersion = '23.4.0' + besuInternalCryptoVersion = '23.1.3' + web3jVersion = '4.10.1-RC' logbackVersion = '1.2.3' klaxonVersion = '5.5' + besuCryptoDepVersion = '0.7.1' + } dependencies { @@ -43,6 +49,21 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' + + implementation "org.hyperledger.besu:plugin-api:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:besu:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:api:$besuInternalVersion" + implementation "org.hyperledger.besu:evm:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:config:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:crypto:$besuInternalCryptoVersion" + implementation "org.hyperledger.besu.internal:rlp:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:kvstore:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:metrics-core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:trie:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:util:$besuInternalVersion" + implementation "org.hyperledger.besu:bls12-381:$besuCryptoDepVersion" + implementation "org.hyperledger.besu:secp256k1:$besuCryptoDepVersion" } jar { manifest { diff --git a/src/main/resources/project/build.gradleImportOpenApi.template b/src/main/resources/project/build.gradleImportOpenApi.template index b4eda2b..b2a63fc 100644 --- a/src/main/resources/project/build.gradleImportOpenApi.template +++ b/src/main/resources/project/build.gradleImportOpenApi.template @@ -1,11 +1,12 @@ plugins { - id "org.web3j.openapi" version "4.9.4" + id "org.web3j.openapi" version "4.10.1-RC" } group '' version '1.0-SNAPSHOT' repositories { + mavenLocal() mavenCentral() } diff --git a/src/main/resources/project/build.gradleJarOpenApi.template b/src/main/resources/project/build.gradleJarOpenApi.template index 60118e4..c578b24 100644 --- a/src/main/resources/project/build.gradleJarOpenApi.template +++ b/src/main/resources/project/build.gradleJarOpenApi.template @@ -1,5 +1,5 @@ plugins { - id "org.web3j.openapi" version "4.9.4" + id "org.web3j.openapi" version "4.10.1-RC" id "com.github.johnrengelman.shadow" version "5.2.0" } @@ -7,6 +7,7 @@ group '' version '1.0-SNAPSHOT' repositories { + mavenLocal() mavenCentral() } diff --git a/src/main/resources/project/build.gradleJava11.template b/src/main/resources/project/build.gradleJava11.template index 325d7e5..b9f84fe 100644 --- a/src/main/resources/project/build.gradleJava11.template +++ b/src/main/resources/project/build.gradleJava11.template @@ -1,9 +1,9 @@ plugins { id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.3.61' + id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.9.4' + id 'org.web3j' version '4.10.1-RC' } group '' @@ -12,6 +12,7 @@ version '0.1.0' sourceCompatibility = 11 repositories { + mavenLocal() mavenCentral() maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" } maven { url "https://artifacts.consensys.net/public/maven/maven/" } @@ -29,9 +30,13 @@ node { } ext { - web3jVersion = '4.9.4' + web3jVersion = '4.10.1-RC' logbackVersion = '1.2.3' klaxonVersion = '5.5' + besuPluginVersion = '23.4.0' + besuInternalVersion = '23.4.0' + besuInternalCryptoVersion = '23.1.3' + besuCryptoDepVersion = '0.7.1' } dependencies { @@ -44,6 +49,21 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' + + implementation "org.hyperledger.besu:plugin-api:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:besu:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:api:$besuInternalVersion" + implementation "org.hyperledger.besu:evm:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:config:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:crypto:$besuInternalCryptoVersion" + implementation "org.hyperledger.besu.internal:rlp:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:kvstore:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:metrics-core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:trie:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:util:$besuInternalVersion" + implementation "org.hyperledger.besu:bls12-381:$besuCryptoDepVersion" + implementation "org.hyperledger.besu:secp256k1:$besuCryptoDepVersion" } jar { diff --git a/src/main/resources/project/build.gradleOpenApi.template b/src/main/resources/project/build.gradleOpenApi.template index 3ebc4ea..7f24637 100644 --- a/src/main/resources/project/build.gradleOpenApi.template +++ b/src/main/resources/project/build.gradleOpenApi.template @@ -1,11 +1,12 @@ plugins { - id "org.web3j.openapi" version "4.9.4" + id "org.web3j.openapi" version "4.10.1-RC" } group '' version '1.0-SNAPSHOT' repositories { + mavenLocal() mavenCentral() } diff --git a/src/main/resources/project/erc20/build.gradleErc20.template b/src/main/resources/project/erc20/build.gradleErc20.template index 50b5c2a..406ca53 100644 --- a/src/main/resources/project/erc20/build.gradleErc20.template +++ b/src/main/resources/project/erc20/build.gradleErc20.template @@ -1,22 +1,22 @@ plugins { id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.3.61' + id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.9.4' + id 'org.web3j' version '4.10.1-RC' } group '' version '0.1.0' -sourceCompatibility = 1.8 +sourceCompatibility = 17 repositories { + mavenLocal() mavenCentral() maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" } maven { url "https://artifacts.consensys.net/public/maven/maven/" } maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" } - maven { url "https://dl.cloudsmith.io/public/consensys/quorum-mainnet-launcher/maven/"} } web3j { @@ -29,9 +29,13 @@ node { } ext { - web3jVersion = '4.9.4' + web3jVersion = '4.10.1-RC' logbackVersion = '1.2.3' klaxonVersion = '5.5' + besuPluginVersion = '23.4.0' + besuInternalVersion = '23.4.0' + besuInternalCryptoVersion = '23.1.3' + besuCryptoDepVersion = '0.7.1' } dependencies { @@ -44,6 +48,21 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' + + implementation "org.hyperledger.besu:plugin-api:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:besu:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:api:$besuInternalVersion" + implementation "org.hyperledger.besu:evm:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:config:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:crypto:$besuInternalCryptoVersion" + implementation "org.hyperledger.besu.internal:rlp:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:kvstore:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:metrics-core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:trie:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:util:$besuInternalVersion" + implementation "org.hyperledger.besu:bls12-381:$besuCryptoDepVersion" + implementation "org.hyperledger.besu:secp256k1:$besuCryptoDepVersion" } jar { @@ -64,11 +83,11 @@ test { } compileKotlin { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = "17" } compileTestKotlin { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = "17" } solidity { diff --git a/src/main/resources/project/erc20/build.gradleErc20Java11.template b/src/main/resources/project/erc20/build.gradleErc20Java11.template index c4e816d..c278a91 100644 --- a/src/main/resources/project/erc20/build.gradleErc20Java11.template +++ b/src/main/resources/project/erc20/build.gradleErc20Java11.template @@ -1,9 +1,9 @@ plugins { id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.3.61' + id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.9.4' + id 'org.web3j' version '4.10.1-RC' } group '' @@ -12,11 +12,11 @@ version '0.1.0' sourceCompatibility = 11 repositories { + mavenLocal() mavenCentral() maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" } maven { url "https://artifacts.consensys.net/public/maven/maven/" } maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" } - maven { url "https://dl.cloudsmith.io/public/consensys/quorum-mainnet-launcher/maven/"} } web3j { @@ -29,9 +29,13 @@ node { } ext { - web3jVersion = '4.9.4' + web3jVersion = '4.10.1-RC' logbackVersion = '1.2.3' klaxonVersion = '5.5' + besuPluginVersion = '23.4.0' + besuInternalVersion = '23.4.0' + besuInternalCryptoVersion = '23.1.3' + besuCryptoDepVersion = '0.7.1' } dependencies { @@ -44,6 +48,21 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' + + implementation "org.hyperledger.besu:plugin-api:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:besu:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:api:$besuInternalVersion" + implementation "org.hyperledger.besu:evm:$besuPluginVersion" + implementation "org.hyperledger.besu.internal:config:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:crypto:$besuInternalCryptoVersion" + implementation "org.hyperledger.besu.internal:rlp:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:kvstore:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:metrics-core:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:trie:$besuInternalVersion" + implementation "org.hyperledger.besu.internal:util:$besuInternalVersion" + implementation "org.hyperledger.besu:bls12-381:$besuCryptoDepVersion" + implementation "org.hyperledger.besu:secp256k1:$besuCryptoDepVersion" } jar { diff --git a/src/main/resources/project/erc20/build.gradleOpenApiErc20.template b/src/main/resources/project/erc20/build.gradleOpenApiErc20.template index ed59bd3..ce9ab1c 100644 --- a/src/main/resources/project/erc20/build.gradleOpenApiErc20.template +++ b/src/main/resources/project/erc20/build.gradleOpenApiErc20.template @@ -1,11 +1,12 @@ plugins { - id "org.web3j.openapi" version "4.9.4" + id "org.web3j.openapi" version "4.10.1-RC" } group '' version '1.0-SNAPSHOT' repositories { + mavenLocal() mavenCentral() } diff --git a/src/main/resources/project/erc777/build.gradleErc777.template b/src/main/resources/project/erc777/build.gradleErc777.template index eb6457f..a52fce6 100644 --- a/src/main/resources/project/erc777/build.gradleErc777.template +++ b/src/main/resources/project/erc777/build.gradleErc777.template @@ -1,17 +1,18 @@ plugins { id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.3.61' + id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.9.4' + id 'org.web3j' version '4.10.1-RC' } group '' version '0.1.0' -sourceCompatibility = 1.8 +sourceCompatibility = 17 repositories { + mavenLocal() mavenCentral() maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" } maven { url "https://artifacts.consensys.net/public/maven/maven/" } @@ -29,7 +30,7 @@ node { } ext { - web3jVersion = '4.9.4' + web3jVersion = '4.10.1-RC' logbackVersion = '1.2.3' klaxonVersion = '5.5' } @@ -64,11 +65,11 @@ test { } compileKotlin { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = "17" } compileTestKotlin { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = "17" } solidity { diff --git a/src/main/resources/project/erc777/build.gradleErc777Java11.template b/src/main/resources/project/erc777/build.gradleErc777Java11.template index 3d6d5a1..fade16c 100644 --- a/src/main/resources/project/erc777/build.gradleErc777Java11.template +++ b/src/main/resources/project/erc777/build.gradleErc777Java11.template @@ -1,9 +1,9 @@ plugins { id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.3.61' + id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.9.4' + id 'org.web3j' version '4.10.1-RC' } group '' @@ -13,6 +13,7 @@ sourceCompatibility = 11 repositories { mavenCentral() + mavenLocal() maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" } maven { url "https://artifacts.consensys.net/public/maven/maven/" } maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" } @@ -29,7 +30,7 @@ node { } ext { - web3jVersion = '4.9.4' + web3jVersion = '4.10.1-RC' klaxonVersion = '5.5' } diff --git a/src/main/resources/project/erc777/build.gradleOpenApiErc777.template b/src/main/resources/project/erc777/build.gradleOpenApiErc777.template index eaa641a..51ea495 100644 --- a/src/main/resources/project/erc777/build.gradleOpenApiErc777.template +++ b/src/main/resources/project/erc777/build.gradleOpenApiErc777.template @@ -1,5 +1,5 @@ plugins { - id "org.web3j.openapi" version "4.9.4" + id "org.web3j.openapi" version "4.10.1-RC" } group '' diff --git a/src/main/resources/project/gradlew-wrapper.properties.template b/src/main/resources/project/gradlew-wrapper.properties.template index ef9a9e0..070cb70 100644 --- a/src/main/resources/project/gradlew-wrapper.properties.template +++ b/src/main/resources/project/gradlew-wrapper.properties.template @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/resources/project/settings.gradle.template b/src/main/resources/project/settings.gradle.template index 1d698f6..4abfc83 100644 --- a/src/main/resources/project/settings.gradle.template +++ b/src/main/resources/project/settings.gradle.template @@ -1 +1,7 @@ +pluginManagement { + repositories { + mavenLocal() + gradlePluginPortal() + } +} rootProject.name = ''; \ No newline at end of file diff --git a/src/test/kotlin/org/web3j/console/openapi/OpenApiProjectTest.kt b/src/test/kotlin/org/web3j/console/openapi/OpenApiProjectTest.kt index 77c29ef..2cd5b23 100644 --- a/src/test/kotlin/org/web3j/console/openapi/OpenApiProjectTest.kt +++ b/src/test/kotlin/org/web3j/console/openapi/OpenApiProjectTest.kt @@ -22,6 +22,7 @@ import org.junit.jupiter.api.Test import org.web3j.console.project.utils.Folders import picocli.CommandLine import java.io.File +import java.io.PrintWriter import java.nio.file.Paths class OpenApiProjectTest { @@ -39,7 +40,8 @@ class OpenApiProjectTest { @Test fun testCorrectArgsOpenApiJarGeneration() { val args = arrayOf("-p", "org.com", "-n", "Test", "-o", tempDirPath, "-s", soliditySource.absolutePath) - val exitCode = CommandLine(JarOpenApiCommand::class.java).execute(*args) + val writer = PrintWriter(System.out) + val exitCode = CommandLine(JarOpenApiCommand::class.java).setErr(writer).execute(*args) assertEquals(0, exitCode) val jarFile = Paths.get(tempDirPath, "Test-server-all.jar").toFile() assertTrue(jarFile.exists()) From f69028565c6b8b504f0888f9e7bafd013a0bb04e Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Thu, 15 Jun 2023 15:28:03 +0300 Subject: [PATCH 3/7] remove java 11 --- logs | 36 +++++-- .../web3j/console/project/ProjectRunner.java | 2 +- .../project/java/Erc20JavaProjectCreator.java | 6 +- .../java/Erc777JavaProjectCreator.java | 6 +- .../console/project/java/JavaProject.java | 11 +-- .../console/project/kotlin/KotlinProject.java | 11 +-- .../resources/project/build.gradle.template | 6 +- .../project/build.gradleImport.template | 4 + .../project/build.gradleImportJava11.template | 90 ------------------ .../project/build.gradleJava11.template | 94 ------------------- .../project/erc20/build.gradleErc20.template | 4 + .../erc20/build.gradleErc20Java11.template | 94 ------------------- .../erc777/build.gradleErc777.template | 3 + .../erc777/build.gradleErc777Java11.template | 72 -------------- 14 files changed, 50 insertions(+), 389 deletions(-) delete mode 100644 src/main/resources/project/build.gradleImportJava11.template delete mode 100644 src/main/resources/project/build.gradleJava11.template delete mode 100644 src/main/resources/project/erc20/build.gradleErc20Java11.template delete mode 100644 src/main/resources/project/erc777/build.gradleErc777Java11.template diff --git a/logs b/logs index cb557c7..a049767 100644 --- a/logs +++ b/logs @@ -1,12 +1,34 @@ -FAILURE: Build failed with an exception. +> Configure project : -* What went wrong: -Could not initialize class org.codehaus.groovy.runtime.InvokerHelper +The 'org.jetbrains.kotlin.platform.*' plugins are deprecated and will no longer be available in Kotlin 1.4. +Please migrate the project to the 'org.jetbrains.kotlin.multiplatform' plugin. +See: https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html -* Try: -Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. +> Task :nodeSetup +> Task :npmSetup SKIPPED +> Task :resolveSolidity -* Get more help at https://help.gradle.org +> Task :npmInstall -BUILD FAILED in 5s +up to date, audited 1 package in 120ms + +found 0 vulnerabilities + +> Task :compileSolidity +Compiler run successful. Artifact(s) can be found in directory build/resources/main/solidity. + +> Task :generateContractWrappers +Generating org.com.wrappers.HelloWorld ... File written to /Users/georgetebrean/Documents/Projects/cloned/web3j-cli/build/tmp/testing/1686831923019MNvjVGInmb/Test/build/generated/sources/web3j/main/java + + +> Task :generateWeb3jOpenApi + +Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. + +You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. + +See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings + +BUILD SUCCESSFUL in 2s +6 actionable tasks: 6 executed diff --git a/src/main/java/org/web3j/console/project/ProjectRunner.java b/src/main/java/org/web3j/console/project/ProjectRunner.java index 5561d82..6e87eac 100644 --- a/src/main/java/org/web3j/console/project/ProjectRunner.java +++ b/src/main/java/org/web3j/console/project/ProjectRunner.java @@ -89,7 +89,7 @@ public void run() { protected abstract void createProject(); public void buildProject(ProjectStructure projectStructure, ProgressCounter progressCounter) - throws IOException, InterruptedException { + throws IOException, InterruptedException, ClassNotFoundException { ProjectCreationUtils.generateWrappers(projectStructure.getProjectRoot()); if (withTests) { new JavaTestCLIRunner( diff --git a/src/main/java/org/web3j/console/project/java/Erc20JavaProjectCreator.java b/src/main/java/org/web3j/console/project/java/Erc20JavaProjectCreator.java index 695c2c9..c5d0f0a 100644 --- a/src/main/java/org/web3j/console/project/java/Erc20JavaProjectCreator.java +++ b/src/main/java/org/web3j/console/project/java/Erc20JavaProjectCreator.java @@ -12,7 +12,6 @@ */ package org.web3j.console.project.java; -import org.web3j.commons.JavaVersion; import org.web3j.console.openapi.project.erc777.CopyUtils; import org.web3j.console.openapi.utils.PrettyPrinter; import org.web3j.console.openapi.utils.SimpleFileLogger; @@ -51,10 +50,7 @@ protected void createProject() { .withGradleSettings("project/settings.gradle.template") .withWrapperGradleSettings("project/gradlew-wrapper.properties.template") .withGradlewWrapperJar("gradle-wrapper.jar") - .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() > 11 - ? "project/erc20/build.gradleErc20.template" - : "project/erc20/build.gradleErc20Java11.template") + .withGradleBuild("project/erc20/build.gradleErc20.template") .withMainJavaClass("project/erc20/JavaErc20.template") .build() .generateFiles(projectStructure); diff --git a/src/main/java/org/web3j/console/project/java/Erc777JavaProjectCreator.java b/src/main/java/org/web3j/console/project/java/Erc777JavaProjectCreator.java index cbe493d..a337f24 100644 --- a/src/main/java/org/web3j/console/project/java/Erc777JavaProjectCreator.java +++ b/src/main/java/org/web3j/console/project/java/Erc777JavaProjectCreator.java @@ -12,7 +12,6 @@ */ package org.web3j.console.project.java; -import org.web3j.commons.JavaVersion; import org.web3j.console.openapi.project.erc777.CopyUtils; import org.web3j.console.openapi.utils.PrettyPrinter; import org.web3j.console.openapi.utils.SimpleFileLogger; @@ -52,10 +51,7 @@ protected void createProject() { .withGradleSettings("project/settings.gradle.template") .withWrapperGradleSettings("project/gradlew-wrapper.properties.template") .withGradlewWrapperJar("gradle-wrapper.jar") - .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() > 11 - ? "project/erc777/build.gradleErc777.template" - : "project/erc777/build.gradleErc777Java11.template") + .withGradleBuild("project/erc777/build.gradleErc777.template") .withMainJavaClass("project/erc777/JavaErc777.template") .withReadme("project/erc777/README.erc777.md") .build() diff --git a/src/main/java/org/web3j/console/project/java/JavaProject.java b/src/main/java/org/web3j/console/project/java/JavaProject.java index 43408fb..763cb15 100644 --- a/src/main/java/org/web3j/console/project/java/JavaProject.java +++ b/src/main/java/org/web3j/console/project/java/JavaProject.java @@ -14,7 +14,6 @@ import java.io.IOException; -import org.web3j.commons.JavaVersion; import org.web3j.console.project.AbstractProject; import org.web3j.console.project.Project; import org.web3j.console.project.ProjectStructure; @@ -58,18 +57,12 @@ public JavaTemplateProvider getTemplateProvider() { if (command.equals("new")) { templateBuilder - .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() > 11 - ? "project/build.gradle.template" - : "project/build.gradleJava11.template") + .withGradleBuild("project/build.gradle.template") .withSolidityProject("contracts/HelloWorld.sol"); } else if (command.equals("import")) { templateBuilder - .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() > 11 - ? "project/build.gradleImport.template" - : "project/build.gradleImportJava11.template") + .withGradleBuild("project/build.gradleImport.template") .withPathToSolidityFolder(solidityImportPath); } diff --git a/src/main/java/org/web3j/console/project/kotlin/KotlinProject.java b/src/main/java/org/web3j/console/project/kotlin/KotlinProject.java index e283317..fcf80d6 100644 --- a/src/main/java/org/web3j/console/project/kotlin/KotlinProject.java +++ b/src/main/java/org/web3j/console/project/kotlin/KotlinProject.java @@ -14,7 +14,6 @@ import java.io.IOException; -import org.web3j.commons.JavaVersion; import org.web3j.console.project.AbstractProject; import org.web3j.console.project.Project; import org.web3j.console.project.ProjectStructure; @@ -59,18 +58,12 @@ public KotlinTemplateProvider getTemplateProvider() { if (command.equals("new")) { templateBuilder - .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() > 11 - ? "project/build.gradle.template" - : "project/build.gradleJava11.template") + .withGradleBuild("project/build.gradle.template") .withSolidityProject("contracts/HelloWorld.sol"); } else if (command.equals("import")) { templateBuilder - .withGradleBuild( - JavaVersion.getJavaVersionAsDouble() > 11 - ? "project/build.gradleImport.template" - : "project/build.gradleImportJava11.template") + .withGradleBuild("project/build.gradleImport.template") .withPathToSolidityFolder(solidityImportPath); } diff --git a/src/main/resources/project/build.gradle.template b/src/main/resources/project/build.gradle.template index 7b7c670..2936d11 100644 --- a/src/main/resources/project/build.gradle.template +++ b/src/main/resources/project/build.gradle.template @@ -91,6 +91,6 @@ compileTestKotlin { kotlinOptions.jvmTarget = "17" } - - - +shadowJar { + zip64 = true +} diff --git a/src/main/resources/project/build.gradleImport.template b/src/main/resources/project/build.gradleImport.template index 0fa3681..7d80ded 100644 --- a/src/main/resources/project/build.gradleImport.template +++ b/src/main/resources/project/build.gradleImport.template @@ -87,4 +87,8 @@ compileTestKotlin { kotlinOptions.jvmTarget = "17" } +shadowJar { + zip64 = true +} + diff --git a/src/main/resources/project/build.gradleImportJava11.template b/src/main/resources/project/build.gradleImportJava11.template deleted file mode 100644 index dfabc25..0000000 --- a/src/main/resources/project/build.gradleImportJava11.template +++ /dev/null @@ -1,90 +0,0 @@ -plugins { - id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.6.21' - id 'application' - id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.10.1-RC' -} - -group '' -version '0.1.0' - -sourceCompatibility = 11 - -repositories { - mavenLocal() - mavenCentral() - maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" } - maven { url "https://artifacts.consensys.net/public/maven/maven/" } - maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" } - maven { url "https://dl.cloudsmith.io/public/consensys/quorum-mainnet-launcher/maven/"} -} - -web3j { - generatedPackageName = '.generated.contracts' -} - -node { - nodeProjectDir.set(file("$projectDir")) -} - -ext { - besuPluginVersion = '23.4.0' - besuInternalVersion = '23.4.0' - besuInternalCryptoVersion = '23.1.3' - web3jVersion = '4.10.1-RC' - logbackVersion = '1.2.3' - klaxonVersion = '5.5' - besuCryptoDepVersion = '0.7.1' - -} - -dependencies { - implementation "org.web3j:core:$web3jVersion", - "ch.qos.logback:logback-core:$logbackVersion", - "ch.qos.logback:logback-classic:$logbackVersion", - "com.beust:klaxon:$klaxonVersion" - implementation "org.web3j:web3j-unit:$web3jVersion" - implementation "org.web3j:web3j-evm:$web3jVersion" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' - - implementation "org.hyperledger.besu:plugin-api:$besuPluginVersion" - implementation "org.hyperledger.besu.internal:besu:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:api:$besuInternalVersion" - implementation "org.hyperledger.besu:evm:$besuPluginVersion" - implementation "org.hyperledger.besu.internal:config:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:core:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:crypto:$besuInternalCryptoVersion" - implementation "org.hyperledger.besu.internal:rlp:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:kvstore:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:metrics-core:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:trie:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:util:$besuInternalVersion" - implementation "org.hyperledger.besu:bls12-381:$besuCryptoDepVersion" - implementation "org.hyperledger.besu:secp256k1:$besuCryptoDepVersion" -} -jar { - manifest { - attributes( - 'Main-Class': '.', - 'Multi-Release':'true' - ) - } -} -application { - mainClassName = '.' -} - -test { - useJUnitPlatform() -} - -compileKotlin { - kotlinOptions.jvmTarget = "11" -} - -compileTestKotlin { - kotlinOptions.jvmTarget = "11" -} diff --git a/src/main/resources/project/build.gradleJava11.template b/src/main/resources/project/build.gradleJava11.template deleted file mode 100644 index b9f84fe..0000000 --- a/src/main/resources/project/build.gradleJava11.template +++ /dev/null @@ -1,94 +0,0 @@ -plugins { - id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.6.21' - id 'application' - id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.10.1-RC' -} - -group '' -version '0.1.0' - -sourceCompatibility = 11 - -repositories { - mavenLocal() - mavenCentral() - maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" } - maven { url "https://artifacts.consensys.net/public/maven/maven/" } - maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" } - maven { url "https://dl.cloudsmith.io/public/consensys/quorum-mainnet-launcher/maven/"} -} - -web3j { - generatedPackageName = '.generated.contracts' - excludedContracts = ['Mortal'] -} - -node { - nodeProjectDir.set(file("$projectDir")) -} - -ext { - web3jVersion = '4.10.1-RC' - logbackVersion = '1.2.3' - klaxonVersion = '5.5' - besuPluginVersion = '23.4.0' - besuInternalVersion = '23.4.0' - besuInternalCryptoVersion = '23.1.3' - besuCryptoDepVersion = '0.7.1' -} - -dependencies { - implementation "org.web3j:core:$web3jVersion", - "ch.qos.logback:logback-core:$logbackVersion", - "ch.qos.logback:logback-classic:$logbackVersion", - "com.beust:klaxon:$klaxonVersion" - implementation("org.web3j:web3j-unit:$web3jVersion") - implementation("org.web3j:web3j-evm:$web3jVersion") - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' - - implementation "org.hyperledger.besu:plugin-api:$besuPluginVersion" - implementation "org.hyperledger.besu.internal:besu:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:api:$besuInternalVersion" - implementation "org.hyperledger.besu:evm:$besuPluginVersion" - implementation "org.hyperledger.besu.internal:config:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:core:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:crypto:$besuInternalCryptoVersion" - implementation "org.hyperledger.besu.internal:rlp:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:kvstore:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:metrics-core:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:trie:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:util:$besuInternalVersion" - implementation "org.hyperledger.besu:bls12-381:$besuCryptoDepVersion" - implementation "org.hyperledger.besu:secp256k1:$besuCryptoDepVersion" -} - -jar { - manifest { - attributes( - 'Main-Class': '.', - 'Multi-Release':'true' - ) - } -} -application { - mainClassName = '.' -} - -test { - useJUnitPlatform() -} - -compileKotlin { - kotlinOptions.jvmTarget = "11" -} - -compileTestKotlin { - kotlinOptions.jvmTarget = "11" -} - - - diff --git a/src/main/resources/project/erc20/build.gradleErc20.template b/src/main/resources/project/erc20/build.gradleErc20.template index 406ca53..abbaaa3 100644 --- a/src/main/resources/project/erc20/build.gradleErc20.template +++ b/src/main/resources/project/erc20/build.gradleErc20.template @@ -94,3 +94,7 @@ solidity { evmVersion = 'constantinople' } +shadowJar { + zip64 = true +} + diff --git a/src/main/resources/project/erc20/build.gradleErc20Java11.template b/src/main/resources/project/erc20/build.gradleErc20Java11.template deleted file mode 100644 index c278a91..0000000 --- a/src/main/resources/project/erc20/build.gradleErc20Java11.template +++ /dev/null @@ -1,94 +0,0 @@ -plugins { - id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.6.21' - id 'application' - id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.10.1-RC' -} - -group '' -version '0.1.0' - -sourceCompatibility = 11 - -repositories { - mavenLocal() - mavenCentral() - maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" } - maven { url "https://artifacts.consensys.net/public/maven/maven/" } - maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" } -} - -web3j { - generatedPackageName = '.generated.contracts' - includedContracts = ['ERC20Token'] -} - -node { - nodeProjectDir.set(file("$projectDir")) -} - -ext { - web3jVersion = '4.10.1-RC' - logbackVersion = '1.2.3' - klaxonVersion = '5.5' - besuPluginVersion = '23.4.0' - besuInternalVersion = '23.4.0' - besuInternalCryptoVersion = '23.1.3' - besuCryptoDepVersion = '0.7.1' -} - -dependencies { - implementation "org.web3j:core:$web3jVersion", - "ch.qos.logback:logback-core:$logbackVersion", - "ch.qos.logback:logback-classic:$logbackVersion", - "com.beust:klaxon:$klaxonVersion" - implementation "org.web3j:web3j-unit:$web3jVersion" - implementation "org.web3j:web3j-evm:$web3jVersion" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' - - implementation "org.hyperledger.besu:plugin-api:$besuPluginVersion" - implementation "org.hyperledger.besu.internal:besu:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:api:$besuInternalVersion" - implementation "org.hyperledger.besu:evm:$besuPluginVersion" - implementation "org.hyperledger.besu.internal:config:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:core:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:crypto:$besuInternalCryptoVersion" - implementation "org.hyperledger.besu.internal:rlp:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:kvstore:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:metrics-core:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:trie:$besuInternalVersion" - implementation "org.hyperledger.besu.internal:util:$besuInternalVersion" - implementation "org.hyperledger.besu:bls12-381:$besuCryptoDepVersion" - implementation "org.hyperledger.besu:secp256k1:$besuCryptoDepVersion" -} - -jar { - manifest { - attributes( - 'Main-Class': '.', - 'Multi-Release':'true' - ) - } -} -application { - mainClassName = '.' -} - -test { - useJUnitPlatform() -} - -compileKotlin { - kotlinOptions.jvmTarget = "11" -} - -compileTestKotlin { - kotlinOptions.jvmTarget = "11" -} - -solidity { - evmVersion = 'constantinople' -} diff --git a/src/main/resources/project/erc777/build.gradleErc777.template b/src/main/resources/project/erc777/build.gradleErc777.template index a52fce6..a054c35 100644 --- a/src/main/resources/project/erc777/build.gradleErc777.template +++ b/src/main/resources/project/erc777/build.gradleErc777.template @@ -76,3 +76,6 @@ solidity { evmVersion = 'constantinople' } +shadowJar { + zip64 = true +} \ No newline at end of file diff --git a/src/main/resources/project/erc777/build.gradleErc777Java11.template b/src/main/resources/project/erc777/build.gradleErc777Java11.template deleted file mode 100644 index fade16c..0000000 --- a/src/main/resources/project/erc777/build.gradleErc777Java11.template +++ /dev/null @@ -1,72 +0,0 @@ -plugins { - id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.6.21' - id 'application' - id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.10.1-RC' -} - -group '' -version '0.1.0' - -sourceCompatibility = 11 - -repositories { - mavenCentral() - mavenLocal() - maven { url "https://hyperledger.jfrog.io/hyperledger/besu-maven" } - maven { url "https://artifacts.consensys.net/public/maven/maven/" } - maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" } - maven { url "https://dl.cloudsmith.io/public/consensys/quorum-mainnet-launcher/maven/"} -} - -web3j { - generatedPackageName = '.generated.contracts' - includedContracts = ['ERC777Token'] -} - -node { - nodeProjectDir.set(file("$projectDir")) -} - -ext { - web3jVersion = '4.10.1-RC' - klaxonVersion = '5.5' -} - -dependencies { - implementation "com.beust:klaxon:$klaxonVersion" - implementation "org.web3j:web3j-unit:$web3jVersion" - implementation "org.web3j:web3j-evm:$web3jVersion" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' -} - -jar { - manifest { - attributes( - 'Main-Class': '.', - 'Multi-Release':'true' - ) - } -} -application { - mainClassName = '.' -} - -test { - useJUnitPlatform() -} - -compileKotlin { - kotlinOptions.jvmTarget = "11" -} - -compileTestKotlin { - kotlinOptions.jvmTarget = "11" -} - -solidity { - evmVersion = 'constantinople' -} From f1ff2424790a36aef9e544a833f9594720b73b63 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Thu, 15 Jun 2023 15:28:29 +0300 Subject: [PATCH 4/7] Delete logs --- logs | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 logs diff --git a/logs b/logs deleted file mode 100644 index a049767..0000000 --- a/logs +++ /dev/null @@ -1,34 +0,0 @@ - -> Configure project : - -The 'org.jetbrains.kotlin.platform.*' plugins are deprecated and will no longer be available in Kotlin 1.4. -Please migrate the project to the 'org.jetbrains.kotlin.multiplatform' plugin. -See: https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html - -> Task :nodeSetup -> Task :npmSetup SKIPPED -> Task :resolveSolidity - -> Task :npmInstall - -up to date, audited 1 package in 120ms - -found 0 vulnerabilities - -> Task :compileSolidity -Compiler run successful. Artifact(s) can be found in directory build/resources/main/solidity. - -> Task :generateContractWrappers -Generating org.com.wrappers.HelloWorld ... File written to /Users/georgetebrean/Documents/Projects/cloned/web3j-cli/build/tmp/testing/1686831923019MNvjVGInmb/Test/build/generated/sources/web3j/main/java - - -> Task :generateWeb3jOpenApi - -Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. - -You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. - -See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings - -BUILD SUCCESSFUL in 2s -6 actionable tasks: 6 executed From 798fb82947716f8112707d252abdf9bd51b6d5b0 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 16 Jun 2023 20:15:20 +0300 Subject: [PATCH 5/7] update web3j --- build.gradle | 2 +- src/main/resources/project/build.gradle.template | 4 ++-- .../resources/project/build.gradleGenerateOpenApi.template | 2 +- src/main/resources/project/build.gradleImport.template | 4 ++-- src/main/resources/project/build.gradleImportOpenApi.template | 2 +- src/main/resources/project/build.gradleJarOpenApi.template | 2 +- src/main/resources/project/build.gradleOpenApi.template | 2 +- src/main/resources/project/erc20/build.gradleErc20.template | 4 ++-- .../resources/project/erc20/build.gradleOpenApiErc20.template | 2 +- src/main/resources/project/erc777/build.gradleErc777.template | 4 ++-- .../project/erc777/build.gradleOpenApiErc777.template | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index cb65737..3f8e328 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ mainClassName = 'org.web3j.console.Web3j' applicationName = 'web3j' ext { - web3jVersion = '4.10.1-RC' + web3jVersion = '4.10.1' picocli = '4.6.0' slf4jVersion = '1.7.30' junitVersion = '5.8.2' diff --git a/src/main/resources/project/build.gradle.template b/src/main/resources/project/build.gradle.template index 2936d11..7862f92 100644 --- a/src/main/resources/project/build.gradle.template +++ b/src/main/resources/project/build.gradle.template @@ -3,7 +3,7 @@ plugins { id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.10.1-RC' + id 'org.web3j' version '4.10.1' } @@ -30,7 +30,7 @@ node { } ext { - web3jVersion = '4.10.1-RC' + web3jVersion = '4.10.1' logbackVersion = '1.2.3' klaxonVersion = '5.5' besuPluginVersion = '23.4.0' diff --git a/src/main/resources/project/build.gradleGenerateOpenApi.template b/src/main/resources/project/build.gradleGenerateOpenApi.template index b3b0276..ddf55b8 100644 --- a/src/main/resources/project/build.gradleGenerateOpenApi.template +++ b/src/main/resources/project/build.gradleGenerateOpenApi.template @@ -1,5 +1,5 @@ plugins { - id "org.web3j.openapi" version "4.10.1-RC" + id "org.web3j.openapi" version "4.10.1" } group '' diff --git a/src/main/resources/project/build.gradleImport.template b/src/main/resources/project/build.gradleImport.template index 7d80ded..861c760 100644 --- a/src/main/resources/project/build.gradleImport.template +++ b/src/main/resources/project/build.gradleImport.template @@ -3,7 +3,7 @@ plugins { id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.10.1-RC' + id 'org.web3j' version '4.10.1' } @@ -33,7 +33,7 @@ ext { besuPluginVersion = '23.4.0' besuInternalVersion = '23.4.0' besuInternalCryptoVersion = '23.1.3' - web3jVersion = '4.10.1-RC' + web3jVersion = '4.10.1' logbackVersion = '1.2.3' klaxonVersion = '5.5' besuCryptoDepVersion = '0.7.1' diff --git a/src/main/resources/project/build.gradleImportOpenApi.template b/src/main/resources/project/build.gradleImportOpenApi.template index b2a63fc..e97382c 100644 --- a/src/main/resources/project/build.gradleImportOpenApi.template +++ b/src/main/resources/project/build.gradleImportOpenApi.template @@ -1,5 +1,5 @@ plugins { - id "org.web3j.openapi" version "4.10.1-RC" + id "org.web3j.openapi" version "4.10.1" } group '' diff --git a/src/main/resources/project/build.gradleJarOpenApi.template b/src/main/resources/project/build.gradleJarOpenApi.template index c578b24..c44e96f 100644 --- a/src/main/resources/project/build.gradleJarOpenApi.template +++ b/src/main/resources/project/build.gradleJarOpenApi.template @@ -1,5 +1,5 @@ plugins { - id "org.web3j.openapi" version "4.10.1-RC" + id "org.web3j.openapi" version "4.10.1" id "com.github.johnrengelman.shadow" version "5.2.0" } diff --git a/src/main/resources/project/build.gradleOpenApi.template b/src/main/resources/project/build.gradleOpenApi.template index 7f24637..8e08b98 100644 --- a/src/main/resources/project/build.gradleOpenApi.template +++ b/src/main/resources/project/build.gradleOpenApi.template @@ -1,5 +1,5 @@ plugins { - id "org.web3j.openapi" version "4.10.1-RC" + id "org.web3j.openapi" version "4.10.1" } group '' diff --git a/src/main/resources/project/erc20/build.gradleErc20.template b/src/main/resources/project/erc20/build.gradleErc20.template index abbaaa3..5e1aaae 100644 --- a/src/main/resources/project/erc20/build.gradleErc20.template +++ b/src/main/resources/project/erc20/build.gradleErc20.template @@ -3,7 +3,7 @@ plugins { id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.10.1-RC' + id 'org.web3j' version '4.10.1' } group '' @@ -29,7 +29,7 @@ node { } ext { - web3jVersion = '4.10.1-RC' + web3jVersion = '4.10.1' logbackVersion = '1.2.3' klaxonVersion = '5.5' besuPluginVersion = '23.4.0' diff --git a/src/main/resources/project/erc20/build.gradleOpenApiErc20.template b/src/main/resources/project/erc20/build.gradleOpenApiErc20.template index ce9ab1c..0c56591 100644 --- a/src/main/resources/project/erc20/build.gradleOpenApiErc20.template +++ b/src/main/resources/project/erc20/build.gradleOpenApiErc20.template @@ -1,5 +1,5 @@ plugins { - id "org.web3j.openapi" version "4.10.1-RC" + id "org.web3j.openapi" version "4.10.1" } group '' diff --git a/src/main/resources/project/erc777/build.gradleErc777.template b/src/main/resources/project/erc777/build.gradleErc777.template index a054c35..6ea2edf 100644 --- a/src/main/resources/project/erc777/build.gradleErc777.template +++ b/src/main/resources/project/erc777/build.gradleErc777.template @@ -3,7 +3,7 @@ plugins { id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' id "com.github.johnrengelman.shadow" version "5.2.0" - id 'org.web3j' version '4.10.1-RC' + id 'org.web3j' version '4.10.1' } group '' @@ -30,7 +30,7 @@ node { } ext { - web3jVersion = '4.10.1-RC' + web3jVersion = '4.10.1' logbackVersion = '1.2.3' klaxonVersion = '5.5' } diff --git a/src/main/resources/project/erc777/build.gradleOpenApiErc777.template b/src/main/resources/project/erc777/build.gradleOpenApiErc777.template index 51ea495..c797a8a 100644 --- a/src/main/resources/project/erc777/build.gradleOpenApiErc777.template +++ b/src/main/resources/project/erc777/build.gradleOpenApiErc777.template @@ -1,5 +1,5 @@ plugins { - id "org.web3j.openapi" version "4.10.1-RC" + id "org.web3j.openapi" version "4.10.1" } group '' From 6e6723c0b59e1bcd467d1173dad2d4d3081336a7 Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 16 Jun 2023 20:16:07 +0300 Subject: [PATCH 6/7] Update gradle.properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index af5380b..c845938 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version=1.5.0-RC +version=1.5.0-SNAPSHOT group=org.web3j.console From e5639f7b66fa1be8bb8d7f517b28ec85570c0d9c Mon Sep 17 00:00:00 2001 From: gtebrean <99179176+gtebrean@users.noreply.github.com> Date: Fri, 16 Jun 2023 20:20:49 +0300 Subject: [PATCH 7/7] Update gradle.properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c845938..8772619 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version=1.5.0-SNAPSHOT +version=1.5.0 group=org.web3j.console