From 55dbe61c650886e7a6986e9a506665f206ba7ad7 Mon Sep 17 00:00:00 2001 From: Zongle Wang Date: Mon, 9 Dec 2024 05:58:47 -0500 Subject: [PATCH] Optimize google maven downloading (#1051) --- build-logic/settings.gradle.kts | 8 +++++++- build.gradle.kts | 8 +++++++- settings.gradle.kts | 16 ++++++++++++++-- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts index de9224e22..b359a5207 100644 --- a/build-logic/settings.gradle.kts +++ b/build-logic/settings.gradle.kts @@ -16,7 +16,13 @@ dependencyResolutionManagement { repositories { - google() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } mavenCentral() } versionCatalogs { diff --git a/build.gradle.kts b/build.gradle.kts index fbcefa906..9a8652956 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,7 +16,13 @@ buildscript { repositories { - google() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } mavenCentral() // Android Build Server diff --git a/settings.gradle.kts b/settings.gradle.kts index 465a72616..2b8c6e45c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -17,7 +17,13 @@ pluginManagement { includeBuild("build-logic") repositories { - google() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } mavenCentral() gradlePluginPortal() } @@ -26,7 +32,13 @@ pluginManagement { dependencyResolutionManagement { repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS repositories { - google() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } mavenCentral() } }