Skip to content

Instantly share code, notes, and snippets.

@martinbonnin
Last active January 7, 2020 09:17
Show Gist options
  • Save martinbonnin/47ff5338b611aff24b1603bc500c963d to your computer and use it in GitHub Desktop.
Save martinbonnin/47ff5338b611aff24b1603bc500c963d to your computer and use it in GitHub Desktop.
// settings.gradle.kts
pluginManagement {
repositories {
mavenCentral()
google()
}
plugins {
id("com.android.application").version("3.5.2")
id("com.squareup.sqldelight").version("1.2.0")
id("org.jetbrains.kotlin.android").version("1.3.60")
}
resolutionStrategy {
// These plugins don't have a marker artifact, tell gradle were to look them up
eachPlugin {
if (requested.id.id == "com.android.application") {
useModule("com.android.tools.build:gradle:${requested.version}")
}
if (requested.id.id == "com.squareup.sqldelight") {
useModule("com.squareup.sqldelight:gradle-plugin:${requested.version}")
}
// The kotlin plugins have marker artifacts so we don't need to handle
// them in resolutionStrategy {}
}
}
}
// app/build.gradle.kts
plugins {
// ...
id("com.android.application")
}
// lib/build.gradle.kts
plugins {
// ...
id("com.squareup.sqldelight")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment