common4j: don't tie sourcesJar/javadocJar to assemble#3115
Closed
fadidurah wants to merge 1 commit into
Closed
Conversation
These tasks are already wired into the publish graph through components.java + the maven-publish plugin, so they will be generated automatically when publish runs. Tying them to assemble made every CI flow that just compiles or runs tests also build javadoc, which is one of the slowest tasks in the common4j build. Local developers who want the artifacts can still run ./gradlew sourcesJar javadocJar explicitly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Folding into existing PR #3113 instead. |
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
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.
Why
common4j(the first library built in our pipeline) currently takes ~52 minutes per build. Investigation surfaced that we run javadoc generation on every CI flow because it's wired into theassembletask graph, even when the flow only needs to compile, run tests, or run spotbugs. Generating javadoc for common4j is one of the slower individual tasks in the build.What
Drop
assemble.dependsOn sourcesJar, javadocJarfromcommon4j/build.gradle.These two tasks are already wired into the publish graph through
components.java+ themaven-publishplugin, so they still run automatically as part ofpublish(which is what creates them in our published artifact). They just no longer run when we onlyassemble.Risk
Very low. Local developers who explicitly want the source/javadoc jars on disk can still run
./gradlew sourcesJar javadocJar. The published artifact is unchanged.Companion PR
1ES-Pipelines (ADO PR — link to be added) adds
Cache@2tasks for~/.gradle/caches,--build-cache --parallelflags, and combines spotbugs + publish into a single Gradle invocation.