Replace jcenter() and mavenCentral() with Maven Central mirror URL#22062
Merged
Conversation
…esolution in Gradle build scripts
…ndency resolution in Gradle build scripts
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates Java/Kotlin Gradle integration-test fixtures to resolve dependencies via Google’s GCS-hosted Maven Central mirror instead of mavenCentral()/jcenter(), improving determinism and reliability in CI environments. It also updates Gradle buildless test expectations to match the new resolved artifact URLs.
Changes:
- Replaced
mavenCentral()andjcenter()usages with an explicitmaven { url = ... }pointing athttps://maven-central.storage-download.googleapis.com/maven2/. - Updated Gradle settings (
settings.gradle/settings.gradle.kts) repository configuration for plugin/dependency resolution to use the mirror. - Updated buildless Gradle test
.expectedoutputs to match the new fetch base URL.
Show a summary per file
| File | Description |
|---|---|
| java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/app/build.gradle | Switch repositories to Maven Central mirror URL. |
| java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/app/build.gradle | Switch repositories to Maven Central mirror URL. |
| java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/app/build.gradle | Switch repositories to Maven Central mirror URL. |
| java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/app/build.gradle | Switch repositories to Maven Central mirror URL. |
| java/ql/integration-tests/java/spring-boot-sample/build.gradle | Switch repositories to Maven Central mirror URL. |
| java/ql/integration-tests/java/partial-gradle-sample/build.gradle | Replace deprecated jcenter() with Maven Central mirror URL. |
| java/ql/integration-tests/java/partial-gradle-sample-without-gradle/build.gradle | Replace deprecated jcenter() with Maven Central mirror URL. |
| java/ql/integration-tests/java/gradle-sample/build.gradle | Replace deprecated jcenter() with Maven Central mirror URL. |
| java/ql/integration-tests/java/gradle-sample-without-wrapper-or-gradle-buildless/build.gradle | Replace deprecated jcenter() with Maven Central mirror URL. |
| java/ql/integration-tests/java/gradle-sample-kotlin-script/app/build.gradle.kts | Switch repositories to Maven Central mirror URL (Kotlin DSL). |
| java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/build.gradle | Replace deprecated jcenter() with Maven Central mirror URL. |
| java/ql/integration-tests/java/diagnostics/java-version-too-old/build.gradle | Replace deprecated jcenter() with Maven Central mirror URL. |
| java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/settings.gradle | Use mirror URL for plugin/dependency resolution repositories. |
| java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/build.gradle | Replace deprecated jcenter() with Maven Central mirror URL. |
| java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/build.gradle | Replace deprecated jcenter() with Maven Central mirror URL. |
| java/ql/integration-tests/java/buildless-proxy-gradle/buildless-fetches.expected | Update expected fetched artifact URL base to mirror. |
| java/ql/integration-tests/java/buildless-proxy-gradle/build.gradle | Switch repositories to Maven Central mirror URL. |
| java/ql/integration-tests/java/buildless-gradle/buildless-fetches.expected | Update expected fetched artifact URL base to mirror. |
| java/ql/integration-tests/java/buildless-gradle/build.gradle | Switch repositories to Maven Central mirror URL. |
| java/ql/integration-tests/java/buildless-gradle-timeout/build.gradle | Replace deprecated jcenter() with Maven Central mirror URL. |
| java/ql/integration-tests/java/buildless-gradle-classifiers/buildless-fetches.expected | Update expected fetched artifact URL base to mirror. |
| java/ql/integration-tests/java/buildless-gradle-classifiers/build.gradle | Switch repositories to Maven Central mirror URL. |
| java/ql/integration-tests/java/buildless-gradle-boms/buildless-fetches.expected | Update expected fetched artifact URL base to mirror. |
| java/ql/integration-tests/java/buildless-gradle-boms/build.gradle | Switch repositories to Maven Central mirror URL. |
| java/ql/integration-tests/java/android-sample/settings.gradle | Use mirror URL for plugin/dependency resolution repositories. |
| java/ql/integration-tests/java/android-sample-old-style/build.gradle | Replace jcenter() with mirror URL in buildscript/allprojects repos; update comment text. |
| java/ql/integration-tests/java/android-sample-old-style-no-wrapper/build.gradle | Replace jcenter() with mirror URL in buildscript/allprojects repos. |
| java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/build.gradle.kts | Replace jcenter() with mirror URL in buildscript/allprojects repos (Kotlin DSL). |
| java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/build.gradle.kts | Replace jcenter() with mirror URL in buildscript/allprojects repos (Kotlin DSL). |
| java/ql/integration-tests/java/android-sample-no-wrapper/settings.gradle | Use mirror URL for plugin/dependency resolution repositories. |
| java/ql/integration-tests/java/android-sample-kotlin-build-script/settings.gradle.kts | Use mirror URL for plugin/dependency resolution repositories (Kotlin DSL). |
| java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/settings.gradle.kts | Use mirror URL for plugin/dependency resolution repositories (Kotlin DSL). |
| java/ql/integration-tests/java/android-8-sample/settings.gradle | Use mirror URL for plugin/dependency resolution repositories. |
Copilot's findings
- Files reviewed: 33/33 changed files
- Comments generated: 1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
oscarsj
approved these changes
Jun 26, 2026
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.
This pull request updates all Gradle
build.gradleandsettings.gradlefiles in the Java integration tests to use a Google Cloud Storage mirror of Maven Central instead of the defaultmavenCentral(). This change ensures consistent and reliable dependency resolution, for improved stability and performance in CI environments It also updates expected fetch URLs in test outputs to match the new repository location.This PR also updates the use of
jcenter(), because that repository has been deprecated since May 1st, 2021.