xenoterracide
05/05/2018, 5:40 AM>>First add a plugin repository in your settings.gradle.kts file for the whole build:
pluginManagement {
repositories {
gradlePluginPortal()
google()
}
}
Then, map the plugin id to the corresponding artifact coordinates, still in your settings.gradle.kts file:
pluginManagement {
// ...
resolutionStrategy {
eachPlugin {
if (requested.id.id == "com.android.application") {
useModule("com.android.tools.build:gradle:${requested.version}")
}
}
}