Skip to content

Instantly share code, notes, and snippets.

@trevorwhitney
Created September 11, 2019 15:50
Show Gist options
  • Save trevorwhitney/0488e1a3148db33fdff302c95410d30b to your computer and use it in GitHub Desktop.
Save trevorwhitney/0488e1a3148db33fdff302c95410d30b to your computer and use it in GitHub Desktop.
abstracting gradle plugin version across multiple files
//https://medium.com/@StefMa/its-time-to-ditch-the-buildscript-block-a1ab12e0d9ce
pluginManagement {
repositories { ... }
eachPlugin {
if (requested.id.id.startsWith("com.android")) {
useModule("com.android.tools.build:gradle:3.1.1")
}
if (requested.id.id.startsWith("org.jetbrains.kotlin")) {
useVersion("1.2.31")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment