Remove dependency annotations from shaded classes - #4445
Merged
Conversation
Contributor
Test ReportTest Results
Code Coverage (Java 25)
|
Member
|
I am glad AI can read it - I cant |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Artifact pipeline
The regular
jarandshadowJaroutputs are internal inputs to the cleanup pipeline. They now have explicitplainandshadowclassifiers and live underbuild/intermediates, outsidebuild/libs.buildFinalJaris the only task that writes the unclassified binary JAR tobuild/libs. It consumes the annotation-cleaned class tree directly, so Gradle tracks the actual final archive instead of a temporary archive that is renamed indoLast.The Java API and runtime variants both expose
buildFinalJar. The Shadow Java variant and assemble hook are disabled, andshadowRuntimeElementsis non-consumable, so dependency resolution cannot select the uncleaned intermediate. Direct signing, Maven Local publication, and remote publication all depend on verification of the final JAR.This separation matters because multiple tasks previously owned the same output path. A direct
shadowJarinvocation could overwrite the cleaned JAR while Gradle still considered the cleanup/reassembly tasks up to date. Unique intermediate paths plus a single final producer remove that failure mode.Verification
./gradlew outgoingVariants: API and runtime variants expose onlybuildFinalJar; no consumable Shadow variant remains./gradlew clean test assemble verifyShadedClassAnnotations compileShadedJarConsumer: passed, including 5,737 tests./gradlew check -x test -x testng: passedpublishGraphqlJavaPublicationToMavenLocal: published only the main, sources, Javadoc, and POM artifactsbuildFinalJaroutput./gradlew jar shadowJarinvocation left the final JAR SHA-256 unchangedThe cleanup currently removes 1,345 annotations from 330 shaded class files.
Artifact size
Both artifacts were built through their complete publication pipelines with the same fixed
999.0.0-size-testrelease version.origin/masterbefore removalThe uncompressed JAR contents decrease by 16,152 bytes. Both archives contain 2,394 entries, and their manifests are identical.