fix: attach sources & javadoc jars to dd-sdk-android-dependencies (unblock 0.4.0 Central release)#19
Merged
Conversation
…lication The dd-sdk-android-dependencies module exports the shaded shadowJar as its main artifact, so it disables the platform auto-config (publishingJavaConfig(useJavaLibraryPlatform = false)). That auto-config is also what generates the sources and javadoc jars Maven Central requires for every released component, so the manually-built `release` publication shipped with neither. The 0.4.0 Central Portal deployment failed validation with "Sources must be provided" / "Javadocs must be provided" for this component. Attach an (effectively empty) sources jar and javadoc jar to the publication. The existing afterEvaluate signing in basePublishingConfig signs them too. Snapshots skip this validation, which is why 0.4.0-SNAPSHOT published fine but the 0.4.0 release was rejected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
The
0.4.0Maven Central Portal deployment failed server-side validation (cloud.flashcat-0.4.0→ FAILED). The failing component:Root cause
dd-sdk-android-dependenciesexports the shadedshadowJaras its main artifact, so it callspublishingJavaConfig(useJavaLibraryPlatform = false). Turning the platform auto-config off also skips the sources/javadoc jars Vanniktech would generate, and the manually-builtreleasepublication only attachedshadowJar.This is a new module first published in 0.4.0 (it was not on Central in 0.3.0), so the gap had never been hit before. Snapshots skip this validation, which is why
0.4.0-SNAPSHOTpublished fine but the0.4.0release was rejected. POM + signing were already correct (the Portal only reported sources/javadoc).Fix
Attach an (effectively empty) sources jar and javadoc jar to the
releasepublication. The module has no sources of its own, so both jars are empty — which still satisfies the Portal's "must be provided" check. The existingafterEvaluatesigning inbasePublishingConfigsigns them automatically.Verification
./gradlew :dd-sdk-android-dependencies:publishReleasePublicationToMavenLocal -Pdd-skip-signingnow produces:dd-sdk-android-dependencies-<v>-sources.jar✅dd-sdk-android-dependencies-<v>-javadoc.jar✅.jar+.pom✅ShadowJar relocation intact: 282 relocated classes under
cloud.flashcat.shaded.*, 0 leaked original package names.🤖 Generated with Claude Code