BUILD-11784 Route the Gradle buildscript classpath through Repox in config-gradle - #317
Conversation
|
Code Review ✅ ApprovedRoutes the Gradle buildscript classpath through Repox to prevent rate-limiting on CI runners. No issues found. OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
Validated end-to-end on real CI via test PR SonarSource/sonar-rust-enterprise#26. That PR deletes sonar-rust-enterprise's per-repo Result — run #28382069572, all jobs green:
The test PR is not for merge — it removes the credential-less local-dev fallback and carries throwaway logging instrumentation. |



Problem
config-gradle's Repox init script rewrites repositories to authenticated Repox forpluginManagement,dependencyResolutionManagement, and each project's dependencyrepositories— but not thebuildscript {}classpath.buildscript { dependencies { classpath(...) } }block resolves that classpath (and transitives, e.g. the Kotlin DSL stdlib) from the Gradle Plugin Portal / Maven Central.org.tukaani:xz→kotlin-stdlib).Change
allprojects { ... }block, also configure thebuildscriptclasspath repositories via the existingconfigureRepoxRepositorieshelper.beforeEvaluateandafterEvaluate.buildscript {}classpath is resolved during build-script evaluation, so injecting Repox inbeforeEvaluatelands it ahead of any repo the script declares — keeping buildscript/plugin classpath deps off the rate-limited public repos.afterEvaluateis kept for parity with the existing project-repos handling.Impact
@v1), it affects every repo consumingconfig-gradleand makes any per-repo buildscript-Repox workaround redundant on CI.Resolves BUILD-11784.