From 254fd6d646ebd4b4f473f152d1ec839368ab1600 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 19 Feb 2020 10:15:18 +0100 Subject: [PATCH] Gradle: Use exclusive repository content to speed up artifact lookup This feature was introduced in Gradle 6.2, see https://docs.gradle.org/6.2/release-notes.html#declaring-exclusive-repository-content Signed-off-by: Sebastian Schuberth --- analyzer/build.gradle.kts | 10 +++++++++- buildSrc/build.gradle.kts | 11 ++++++++++- cli/build.gradle.kts | 10 +++++++++- helper-cli/build.gradle.kts | 10 +++++++++- reporter/build.gradle.kts | 10 +++++++++- 5 files changed, 46 insertions(+), 5 deletions(-) diff --git a/analyzer/build.gradle.kts b/analyzer/build.gradle.kts index ceef0b1deba27..d0240187aaa23 100644 --- a/analyzer/build.gradle.kts +++ b/analyzer/build.gradle.kts @@ -32,7 +32,15 @@ plugins { } repositories { - maven("https://repo.gradle.org/gradle/libs-releases-local/") + exclusiveContent { + forRepository { + maven("https://repo.gradle.org/gradle/libs-releases-local/") + } + + filter { + includeGroup("org.gradle") + } + } } dependencies { diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index dd71e90a957c0..7b718580500d7 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -34,7 +34,16 @@ plugins { repositories { jcenter() - maven("https://plugins.gradle.org/m2/") + + exclusiveContent { + forRepository { + maven("https://plugins.gradle.org/m2/") + } + + filter { + includeGroupByRegex(".*gradle\\.plugin.*") + } + } } val ideaExtPluginVersion = extra["ideaExtPluginVersion"] diff --git a/cli/build.gradle.kts b/cli/build.gradle.kts index 41a4351b13196..7a2fb1b493205 100644 --- a/cli/build.gradle.kts +++ b/cli/build.gradle.kts @@ -48,7 +48,15 @@ repositories { // Need to repeat the analyzer's custom repository definition here, see // https://github.com/gradle/gradle/issues/4106. - maven("https://repo.gradle.org/gradle/libs-releases-local/") + exclusiveContent { + forRepository { + maven("https://repo.gradle.org/gradle/libs-releases-local/") + } + + filter { + includeGroup("org.gradle") + } + } } dependencies { diff --git a/helper-cli/build.gradle.kts b/helper-cli/build.gradle.kts index 90f122d6eaaf1..221670a686814 100644 --- a/helper-cli/build.gradle.kts +++ b/helper-cli/build.gradle.kts @@ -45,7 +45,15 @@ repositories { // Need to repeat the analyzer's custom repository definition here, see // https://github.com/gradle/gradle/issues/4106. - maven("https://repo.gradle.org/gradle/libs-releases-local/") + exclusiveContent { + forRepository { + maven("https://repo.gradle.org/gradle/libs-releases-local/") + } + + filter { + includeGroup("org.gradle") + } + } } dependencies { diff --git a/reporter/build.gradle.kts b/reporter/build.gradle.kts index 2af87b0a352c5..7b114d218600f 100644 --- a/reporter/build.gradle.kts +++ b/reporter/build.gradle.kts @@ -49,7 +49,15 @@ sourceSets.named("main") { } repositories { - maven("https://www.robotooling.com/maven/") + exclusiveContent { + forRepository { + maven("https://www.robotooling.com/maven/") + } + + filter { + includeGroup("bad.robot") + } + } } dependencies {