From ed68addca6f2a7dd99e17e5f6912f79e1054425b Mon Sep 17 00:00:00 2001 From: Kyon <32325790+kyonRay@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:00:38 +0800 Subject: [PATCH] (project): sync code from branch 0.8.11. (#36) --- .github/workflows/workflow.yml | 2 +- .gitignore | 4 ++++ build.gradle | 6 +++--- solc-0.8.11/build.gradle | 2 +- .../main/java/org/fisco/solc/compiler/SolidityCompiler.java | 5 ++++- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index f21adae..86fcc40 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12] + os: [ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12] steps: - uses: actions/checkout@v2 with: diff --git a/.gitignore b/.gitignore index 52c80af..1602e31 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,7 @@ log** gradle.properties gpg.gpg +log4j.properties + +## macOS +.DS_Store \ No newline at end of file diff --git a/build.gradle b/build.gradle index 7d56141..132164b 100644 --- a/build.gradle +++ b/build.gradle @@ -69,11 +69,11 @@ subprojects { } dependencies { - compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.32' - compile(group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.14.0') { + compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36' + compile(group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.14.3') { force true } - compile group: 'com.google.code.gson', name: 'gson', version: '2.9.0' + compile group: 'com.google.code.gson', name: 'gson', version: '2.9.1' testImplementation group: 'junit', name: 'junit', version: '4.12' testImplementation group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.32' diff --git a/solc-0.8.11/build.gradle b/solc-0.8.11/build.gradle index 13a3cd4..2e88342 100644 --- a/solc-0.8.11/build.gradle +++ b/solc-0.8.11/build.gradle @@ -5,7 +5,7 @@ plugins { group 'org.fisco-bcos' archivesBaseName = 'solcJ' -version = '0.8.11.1-SNAPSHOT' +version = '0.8.11.1' task sourcesJar(type: Jar) { from sourceSets.main.allJava diff --git a/solc-0.8.11/src/main/java/org/fisco/solc/compiler/SolidityCompiler.java b/solc-0.8.11/src/main/java/org/fisco/solc/compiler/SolidityCompiler.java index 2d5945d..0f509a9 100644 --- a/solc-0.8.11/src/main/java/org/fisco/solc/compiler/SolidityCompiler.java +++ b/solc-0.8.11/src/main/java/org/fisco/solc/compiler/SolidityCompiler.java @@ -45,7 +45,7 @@ private void initSolc(boolean sm) { */ public static Result compile(File source, boolean sm, boolean combinedJson, Option... options) throws IOException { - return getInstance().compileSrc(source, sm, true, combinedJson, options); + return getInstance().compileSrc(source, sm, false, combinedJson, options); } /** @@ -386,6 +386,9 @@ private List prepareCommandOptions( commandParts.add(option.getValue()); } } + for (Option option : getElementsOf(NameOnlyOption.class, options)) { + commandParts.add("--" + option.getName()); + } // new in solidity 0.5.0: using stdin requires an explicit "-". The following output // of 'solc' if no file is provided, e.g.,: solc --combined-json abi,bin,interface,metadata //