Build perf: publish broker libraries directly to NewAndroid + decouple common4j sources/javadoc from assemble#3113
Open
fadidurah wants to merge 3 commits into
Open
Conversation
Switches Maven publishing from the AndroidADAL feed to the NewAndroid feed to eliminate the upstream-feed traversal latency that occurs when downstream pipeline stages resolve freshly-published artifacts. Background: - Builds publish to AndroidADAL but consumers fetch from NewAndroid. - NewAndroid resolves AndroidADAL only via its upstream chain, after walking Maven Central, Google, etc., causing first-fetch latency on every newly published version (which CI agents always pay due to ephemeral caches). - AndroidADAL will be added as an upstream of NewAndroid (done outside this change) so any external consumers still resolving from AndroidADAL keep working transparently. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR switches module Maven publishing targets from the AndroidADAL feed to the NewAndroid feed so downstream CI resolves newly published artifacts directly from the feed it consumes.
Changes:
- Updates publishing repository URLs for Common Android/Auth support libraries to
NewAndroid. - Leaves credentials, artifact coordinates, and existing secondary publishing repositories unchanged.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
uiautomationutilities/build.gradle |
Publishes UI automation utilities to NewAndroid. |
testutils/build.gradle |
Publishes test utilities to NewAndroid. |
LabApiUtilities/build.gradle |
Publishes lab API utilities to NewAndroid. |
labapi/build.gradle |
Publishes lab API client library to NewAndroid. |
keyvault/build.gradle |
Publishes keyvault library to NewAndroid. |
common4j/build.gradle |
Publishes Common Java library to NewAndroid. |
common/build.gradle |
Publishes Common Android artifacts to NewAndroid. |
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>
When configure-on-demand is enabled, Gradle only configures the projects that are actually in the dependency graph of the requested tasks. Previously building AADAuthenticator triggered configure of broker4j, brokerHost, java-linux-test-app, LinuxBroker, brokerautomationapp etc. — none of which are needed for AADAuthenticator:assembleDistRelease. Logs showed ~16 min spent in unnecessary configure phases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Why
Two things are slowing our broker library builds:
AndroidADALbut consume fromNewAndroid. NewAndroid has AndroidADAL as a deeper upstream, so any cross-build dep resolves through the full upstream chain.assemble.dependsOn sourcesJar, javadocJarmakes us generate javadoc on every CI flow (compile / test / spotbugs / etc.), even thoughpublishalready produces them throughmaven-publish.What
Feed flip (publish → NewAndroid directly) — 7 build.gradle files:
common/build.gradlecommon4j/build.gradlekeyvault/build.gradlelabapi/build.gradleLabApiUtilities/build.gradletestutils/build.gradleuiautomationutilities/build.gradlecommon4j perf — drop
assemble.dependsOn sourcesJar, javadocJar. These tasks are already wired into the publish graph throughcomponents.java+maven-publish, so they still run when wepublish. They just no longer run on every other CI flow. Local devs can still run./gradlew sourcesJar javadocJarexplicitly.Companion changes
Cache@2for Gradle caches + Robolectric SDKs, pipes--build-cache --parallel, combines Spotbugs + Publish into a single Gradle invocation.