Skip to content

Instantly share code, notes, and snippets.

@AndrewReitz
Last active December 6, 2021 23:19
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewReitz/b9dbab1336fd1e5080fcc2772fd463d1 to your computer and use it in GitHub Desktop.
Save AndrewReitz/b9dbab1336fd1e5080fcc2772fd463d1 to your computer and use it in GitHub Desktop.
settings.gradle pluginManagement
pluginManagement {
repositories {
gradlePluginPortal()
google()
jcenter()
maven { url = uri("https://maven.fabric.io/public") }
}
resolutionStrategy {
eachPlugin {
if (requested.id.id in setOf("kotlin-android", "kotlin-kapt", "kotlin-android-extensions")) {
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
}
if (requested.id.id in setOf("com.android.application", "com.android.feature")) {
useModule("com.android.tools.build:gradle:${requested.version}")
}
if (requested.id.id == "com.google.gms.google-services") {
useModule("com.google.gms:google-services:${requested.version}")
}
if (requested.id.id == "io.fabric") {
useModule("io.fabric.tools:gradle:${requested.version}")
}
if (requested.id.id == "com.google.firebase.firebase-perf") {
useModule("com.google.firebase:firebase-plugins:${requested.version}")
}
if (requested.id.id == "androidx.navigation.safeargs") {
useModule("android.arch.navigation:navigation-safe-args-gradle-plugin:${requested.version}")
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment