Skip to content

Instantly share code, notes, and snippets.

@ganadist
Last active February 5, 2020 13:22
Show Gist options
  • Save ganadist/f45b1bb9ecbecd93752a9f3ff39ea15e to your computer and use it in GitHub Desktop.
Save ganadist/f45b1bb9ecbecd93752a9f3ff39ea15e to your computer and use it in GitHub Desktop.
plugins {
`kotlin-dsl`
}
repositories {
val r8Version = findProperty("r8Version")?.toString()
if (!r8Version.isNullOrEmpty()) {
if (r8Version.contains(".")) {
// R8 release maven repository, and r8Version format is x.y.z
maven("http://storage.googleapis.com/r8-releases/raw")
} else {
// R8 dev maven repository, and r8Version format is git commit id
maven("http://storage.googleapis.com/r8-releases/raw/master")
}
}
jcenter()
}
dependencies {
val r8Version = findProperty("r8Version")?.toString()
if (!r8Version.isNullOrEmpty()) {
compileOnly("com.android.tools:r8:$r8Version")
runtimeClasspath("com.android.tools:r8:$r8Version")
println("R8 $r8Version will be applied")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment