`rules_android_maven` Should Not Force Large Live Coursier Resolution
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- android, java
- Domain
- build-system
Research direction
Locate the rules_android_maven maven.install definition and inspect the existing rules_android_maven_install.json lock file. Enable the lock file there, then run the reported USE_BAZEL_VERSION=9.0.2 bazelisk build command with RJE_VERBOSE=true and confirm that the build succeeds without the large live Coursier resolution or timeout.
Written by the indexing model from the issue text.
Description
Summary
rules_android@0.7.1 triggers large live Coursier resolution (no lock file), causing slow, fragile builds and frequent timeouts:
Error while fetching artifact with coursier: Timed out
Repro
Repo: https://github.com/bc-lee/rules-android-maven-live-resolution-repro
Run:
RJE_VERBOSE=true USE_BAZEL_VERSION=9.0.2 bazelisk build \
@rules_android//src/tools/java/com/google/devtools/build/android/r8:r8
(RJE_VERBOSE=true to expose Coursier behavior)
Root Cause
rules_android_maven defines a large maven.install(...) (50+ artifacts) but does not enable its lock file, forcing:
- large live
coursier fetch - duplicate resolution (
rules_android_maven,bazel_worker_maven) - heavy network traffic before actual build
Impact
- slow builds
- network-sensitive / flaky (timeouts)
- problematic in CI or restricted environments
Suggested Fix
Enable the existing lock file:
maven.install(
name = "rules_android_maven",
lock_file = "//:rules_android_maven_install.json",
...
)
Evidence
With only this change:
- # lock_file = "//:rules_android_maven_install.json",
+ lock_file = "//:rules_android_maven_install.json",
the same build succeeds reliably.
Workaround
Downstream patch:
+ lock_file = "//:rules_android_maven_install.json",
(Optionally resolver = "gradle")
- Dominant language
- Java
- Stars
- 203
- Forks
- 95
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bazelbuild/rules_android
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bazelbuild/rules_android#539 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bazelbuild/rules_android#535 · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
bazelbuild/rules_android#564 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
bazelbuild/rules_android#560 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
bazelbuild/rules_android#558 ·
All issues in bazelbuild/rules_android
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100