Skip to content

Commit 69d7f21

Browse files
BarbatosBarbatos
authored andcommitted
fix(plugins): align :crypto excludes with direct :platform dependency
Per review on PR tronprotocol#6738: the direct :platform dependency on x86 already excludes leveldbjni-all, zksnark-java-sdk, and commons-io, but the transitive :crypto -> :common -> :platform path was only excluding leveldbjni-all. Verified via :plugins:dependencyInsight that zksnark-java-sdk and commons-io were leaking back into x86 runtimeClasspath through :crypto. Mirror the remaining two excludes on :crypto so both paths to :platform agree on what is kept out of the plugins fat jar. This preserves the intent of the existing :platform excludes rather than relaxing them. Re-verified on x86_64 + JDK 8: - runtimeClasspath no longer contains leveldbjni-all 1.8, zksnark-java-sdk, or commons-io:commons-io - java -jar Toolkit.jar db archive -d <empty> still exits 0 - :plugins:test, checkstyleMain, checkstyleTest all pass
1 parent 62dbcca commit 69d7f21

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

plugins/build.gradle

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,17 @@ dependencies {
3939
exclude group: 'io.prometheus'
4040
exclude group: 'org.aspectj'
4141
exclude group: 'org.apache.httpcomponents'
42-
// :crypto -> :common -> :platform transitively pulls leveldbjni-all 1.8,
43-
// which conflicts with the io.github.tronprotocol leveldbjni-all 1.18.2
44-
// declared below on x86. Both jars contain org/iq80/leveldb/Options.class;
45-
// in the fat jar the duplicate-entry write order can leave the 1.8 copy,
46-
// which lacks Options.maxBatchSize(int) and breaks `db archive` at runtime.
42+
// :crypto -> :common -> :platform transitively pulls in artifacts that
43+
// the direct :platform dependency below already excludes on x86. Mirror
44+
// those excludes here so both paths to :platform agree, otherwise the
45+
// transitive copies leak into the fat jar. In particular leveldbjni-all
46+
// 1.8 conflicts with io.github.tronprotocol leveldbjni-all 1.18.2: both
47+
// jars carry org/iq80/leveldb/Options.class; the duplicate-entry write
48+
// order in the fat jar can leave the 1.8 copy, which lacks
49+
// Options.maxBatchSize(int) and breaks `db archive` at runtime.
4750
exclude group: 'org.fusesource.leveldbjni', module: 'leveldbjni-all'
51+
exclude group: 'io.github.tronprotocol', module: 'zksnark-java-sdk'
52+
exclude group: 'commons-io', module: 'commons-io'
4853
}
4954
implementation group: 'info.picocli', name: 'picocli', version: '4.6.3'
5055
implementation group: 'com.typesafe', name: 'config', version: '1.3.2'

0 commit comments

Comments
 (0)