From 1305b3934151bb50b8a68a239e530c99c550b8a0 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Thu, 14 Mar 2024 13:31:28 +0100 Subject: [PATCH] chore: Only look for Google produced artifacts in Google repositories (#530) Optimise the `repositories` declaration with a Gradle content filter that limits the `google()` repository to just Google artifacts. Results in a slight speedup when checking repositories, as the `google()` repository can be skipped when looking for non-Google artifacts. --- settings.gradle.kts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index d3dddfefb..fbb8d739a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,6 +1,12 @@ pluginManagement { repositories { - google() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } gradlePluginPortal() } @@ -11,7 +17,13 @@ pluginManagement { dependencyResolutionManagement { repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS repositories { - google() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } mavenCentral() maven("https://jitpack.io") }