From be808b8ceec201cc1e87540f7edc6d101c730205 Mon Sep 17 00:00:00 2001 From: Goooler Date: Mon, 20 Nov 2023 17:03:33 +0800 Subject: [PATCH] Optimise repositories declarations This will speed up dependencies downloading. --- build-logic/settings.gradle.kts | 7 ++++++- build.gradle.kts | 7 ++++++- settings.gradle.kts | 14 ++++++++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts index de9224e220..6896b4e5f4 100644 --- a/build-logic/settings.gradle.kts +++ b/build-logic/settings.gradle.kts @@ -16,7 +16,12 @@ dependencyResolutionManagement { repositories { - google() + google { + content { + includeGroupByRegex(".*google.*") + includeGroupByRegex(".*android.*") + } + } mavenCentral() } versionCatalogs { diff --git a/build.gradle.kts b/build.gradle.kts index 7b54f90583..881341e309 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,7 +16,12 @@ buildscript { repositories { - google() + google { + content { + includeGroupByRegex(".*google.*") + includeGroupByRegex(".*android.*") + } + } mavenCentral() // Android Build Server diff --git a/settings.gradle.kts b/settings.gradle.kts index fa043c955a..50785f93be 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -17,7 +17,12 @@ pluginManagement { includeBuild("build-logic") repositories { - google() + google { + content { + includeGroupByRegex(".*google.*") + includeGroupByRegex(".*android.*") + } + } mavenCentral() gradlePluginPortal() } @@ -26,7 +31,12 @@ pluginManagement { dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { - google() + google { + content { + includeGroupByRegex(".*google.*") + includeGroupByRegex(".*android.*") + } + } mavenCentral() } }