Skip to content

Replace jcenter() and mavenCentral() with Maven Central mirror URL#22062

Merged
mario-campos merged 6 commits into
mainfrom
mario-campos/mirror-maven-central/gradle
Jun 26, 2026
Merged

Replace jcenter() and mavenCentral() with Maven Central mirror URL#22062
mario-campos merged 6 commits into
mainfrom
mario-campos/mirror-maven-central/gradle

Conversation

@mario-campos

Copy link
Copy Markdown
Contributor

This pull request updates all Gradle build.gradle and settings.gradle files in the Java integration tests to use a Google Cloud Storage mirror of Maven Central instead of the default mavenCentral(). 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.

@mario-campos mario-campos requested a review from a team as a code owner June 25, 2026 19:55
Copilot AI review requested due to automatic review settings June 25, 2026 19:55
@github-actions github-actions Bot added the Java label Jun 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() and jcenter() usages with an explicit maven { url = ... } pointing at https://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 .expected outputs 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>
@mario-campos mario-campos requested a review from a team June 25, 2026 20:02
@mario-campos mario-campos merged commit da3d0cf into main Jun 26, 2026
14 checks passed
@mario-campos mario-campos deleted the mario-campos/mirror-maven-central/gradle branch June 26, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants