diff --git a/build.gradle.kts b/build.gradle.kts index 9820a5187..01bd0c750 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,17 @@ buildscript { google() mavenCentral() gradlePluginPortal() - maven(url = "https://jitpack.io") + // JitPack only ever serves its own coordinate namespaces. Without this filter it + // is queried for every artifact, and because it sits ahead of repo.gradle.org a + // transient JitPack timeout fails the build before the tooling API is ever looked + // for where it actually lives. + maven(url = "https://jitpack.io") { + content { + includeGroupByRegex("com\\.github\\..*") + includeGroupByRegex("com\\.gitlab\\..*") + includeGroupByRegex("com\\.bitbucket\\..*") + } + } maven(url = "https://repo.gradle.org/gradle/libs-releases") } diff --git a/settings.gradle.kts b/settings.gradle.kts index a6319df72..8d0c2b498 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,7 +7,13 @@ pluginManagement { google() mavenCentral() gradlePluginPortal() - maven(url = "https://jitpack.io") + maven(url = "https://jitpack.io") { + content { + includeGroupByRegex("com\\.github\\..*") + includeGroupByRegex("com\\.gitlab\\..*") + includeGroupByRegex("com\\.bitbucket\\..*") + } + } } resolutionStrategy { eachPlugin { @@ -59,7 +65,13 @@ dependencyResolutionManagement { mavenCentral() maven(url = "https://plugins.gradle.org/m2/") maven(url = "https://maven.fpregistry.io/releases") - maven(url = "https://jitpack.io") + maven(url = "https://jitpack.io") { + content { + includeGroupByRegex("com\\.github\\..*") + includeGroupByRegex("com\\.gitlab\\..*") + includeGroupByRegex("com\\.bitbucket\\..*") + } + } maven(url = "https://central.sonatype.com/repository/maven-snapshots/") } }