Skip to content

Commit

Permalink
Gradle: Only query google repository for Android dependencies
Browse files Browse the repository at this point in the history
Avoid leaking all other used dependencies to Google servers and speed
up dependency resolution.
  • Loading branch information
saschpe committed Jun 12, 2024
1 parent 556bf9b commit dd13b03
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
@file:Suppress("UnstableApiUsage")

pluginManagement {
repositories {
gradlePluginPortal()
google()
google {
mavenContent {
includeGroupAndSubgroups("androidx")
includeGroupAndSubgroups("com.android")
includeGroupAndSubgroups("com.google")
}
}
}

plugins {
Expand All @@ -12,10 +20,15 @@ pluginManagement {
}

dependencyResolutionManagement {
@Suppress("UnstableApiUsage")
repositories {
mavenCentral()
google()
google {
mavenContent {
includeGroupAndSubgroups("androidx")
includeGroupAndSubgroups("com.android")
includeGroupAndSubgroups("com.google")
}
}
}
}

Expand Down

0 comments on commit dd13b03

Please sign in to comment.