Skip to content

Commit 0aebaff

Browse files
BarbatosBarbatos
authored andcommitted
fix(plugins): declare missing :crypto and :common jar deps for binaryRelease
Per review on PR #6738 (halibobo1205): the binaryRelease Jar task zips up runtimeClasspath contents, which on this branch includes :crypto:jar and :common:jar (introduced by #6637), but the task only declared dependsOn on :protocol:jar and :platform:jar. Gradle was emitting an implicit_dependency warning and disabling execution optimizations to compensate. Reproduced locally: $ ./gradlew clean && ./gradlew :plugins:buildToolkitJar > Cannot expand ZIP '.../crypto/build/libs/crypto-1.0.0.jar' as it does not exist. Add :crypto:jar and :common:jar to dependsOn so partial / parallel / incremental builds can no longer race against missing dependency jars. Verified: - ./gradlew clean :plugins:buildToolkitJar passes with --warning-mode all and no implicit_dependency warning - Smoke (db archive -d <empty>) still exits 0 on x86 docker - :plugins:test, checkstyleMain, checkstyleTest all pass
1 parent 69d7f21 commit 0aebaff

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

plugins/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,13 @@ def binaryRelease(taskName, jarName, mainClass) {
141141
from(sourceSets.main.output) {
142142
include "/**"
143143
}
144-
dependsOn (project(':protocol').jar, project(':platform').jar) // explicit_dependency
144+
// Fat jar zips up runtimeClasspath, which includes the jar outputs of
145+
// every project dependency. Declare them all explicitly so Gradle does
146+
// not warn about implicit_dependency and disable execution optimizations
147+
// (and so partial / parallel builds cannot run binaryRelease before the
148+
// dependency jars exist).
149+
dependsOn (project(':protocol').jar, project(':platform').jar,
150+
project(':crypto').jar, project(':common').jar) // explicit_dependency
145151
from {
146152
configurations.runtimeClasspath.collect { // https://docs.gradle.org/current/userguide/upgrading_version_6.html#changes_6.3
147153
it.isDirectory() ? it : zipTree(it)

0 commit comments

Comments
 (0)