Skip to content

Commit 55dbe61

Browse files
authored
Optimize google maven downloading (#1051)
1 parent afb6741 commit 55dbe61

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

build-logic/settings.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@
1616

1717
dependencyResolutionManagement {
1818
repositories {
19-
google()
19+
google {
20+
content {
21+
includeGroupByRegex("com\\.android.*")
22+
includeGroupByRegex("com\\.google.*")
23+
includeGroupByRegex("androidx.*")
24+
}
25+
}
2026
mavenCentral()
2127
}
2228
versionCatalogs {

build.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@
1616

1717
buildscript {
1818
repositories {
19-
google()
19+
google {
20+
content {
21+
includeGroupByRegex("com\\.android.*")
22+
includeGroupByRegex("com\\.google.*")
23+
includeGroupByRegex("androidx.*")
24+
}
25+
}
2026
mavenCentral()
2127

2228
// Android Build Server

settings.gradle.kts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@
1717
pluginManagement {
1818
includeBuild("build-logic")
1919
repositories {
20-
google()
20+
google {
21+
content {
22+
includeGroupByRegex("com\\.android.*")
23+
includeGroupByRegex("com\\.google.*")
24+
includeGroupByRegex("androidx.*")
25+
}
26+
}
2127
mavenCentral()
2228
gradlePluginPortal()
2329
}
@@ -26,7 +32,13 @@ pluginManagement {
2632
dependencyResolutionManagement {
2733
repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS
2834
repositories {
29-
google()
35+
google {
36+
content {
37+
includeGroupByRegex("com\\.android.*")
38+
includeGroupByRegex("com\\.google.*")
39+
includeGroupByRegex("androidx.*")
40+
}
41+
}
3042
mavenCentral()
3143
}
3244
}

0 commit comments

Comments
 (0)