@@ -39,6 +39,16 @@ dependencies {
3939 exclude group : ' io.prometheus'
4040 exclude group : ' org.aspectj'
4141 exclude group : ' org.apache.httpcomponents'
42+ // x86 declares io.github.tronprotocol:leveldbjni-all:1.18.2 below;
43+ // :crypto -> :common -> :platform also transitively pulls
44+ // org.fusesource.leveldbjni:leveldbjni-all:1.8. Both jars carry
45+ // org/iq80/leveldb/Options.class and the fat jar's last-write-wins
46+ // merge can leave the 1.8 copy, which lacks Options.maxBatchSize(int)
47+ // and breaks `db archive` at runtime. Drop the 1.8 transitive on x86
48+ // only; ARM64 has a single copy via :platform direct and no conflict.
49+ if (! rootProject. archInfo. isArm64) {
50+ exclude group : ' org.fusesource.leveldbjni' , module : ' leveldbjni-all'
51+ }
4252 }
4353 implementation group : ' info.picocli' , name : ' picocli' , version : ' 4.6.3'
4454 implementation group : ' com.typesafe' , name : ' config' , version : ' 1.3.2'
@@ -49,9 +59,12 @@ dependencies {
4959 implementation project(" :platform" )
5060 } else {
5161 implementation project(" :platform" ), {
62+ // Only leveldbjni-all is excluded; the io.github.tronprotocol
63+ // 1.18.2 fork below is the version we want on x86. zksnark-java-sdk
64+ // and commons-io are intentionally kept (the plugins test runtime
65+ // needs both via :crypto -> :common -> :platform and the duplicate
66+ // resolution dedups to one copy).
5267 exclude(group : ' org.fusesource.leveldbjni' , module : ' leveldbjni-all' )
53- exclude(group : ' io.github.tronprotocol' , module : ' zksnark-java-sdk' )
54- exclude(group : ' commons-io' , module : ' commons-io' )
5568 }
5669 implementation ' io.github.tronprotocol:leveldbjni-all:1.18.2'
5770 implementation ' io.github.tronprotocol:leveldb:1.18.2'
@@ -130,7 +143,13 @@ def binaryRelease(taskName, jarName, mainClass) {
130143 from(sourceSets. main. output) {
131144 include " /**"
132145 }
133- dependsOn (project(' :protocol' ). jar, project(' :platform' ). jar) // explicit_dependency
146+ // Fat jar zips up runtimeClasspath, which includes the jar outputs of
147+ // every project dependency. Declare them all explicitly so Gradle does
148+ // not warn about implicit_dependency and disable execution optimizations
149+ // (and so partial / parallel builds cannot run binaryRelease before the
150+ // dependency jars exist).
151+ dependsOn (project(' :protocol' ). jar, project(' :platform' ). jar,
152+ project(' :crypto' ). jar, project(' :common' ). jar) // explicit_dependency
134153 from {
135154 configurations. runtimeClasspath. collect { // https://docs.gradle.org/current/userguide/upgrading_version_6.html#changes_6.3
136155 it. isDirectory() ? it : zipTree(it)
0 commit comments