Skip to content

Instantly share code, notes, and snippets.

@enginebai
Last active October 16, 2019 10:52
Show Gist options
  • Save enginebai/67e7dd67a62f71c99c4fca8d9d9b2a29 to your computer and use it in GitHub Desktop.
Save enginebai/67e7dd67a62f71c99c4fca8d9d9b2a29 to your computer and use it in GitHub Desktop.
Project-level build.gradle migration
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = "1.3.50"
repositories {
google()
jcenter()
}
dependencies {
- classpath "com.android.tools.build:gradle:3.5.1"
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ classpath("com.android.tools.build:gradle:3.5.1")
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
@@ -23,6 +22,8 @@ allprojects {
}
}
-task clean(type: Delete) {
- delete rootProject.buildDir
+tasks {
+ val clean by registering(Delete::class) {
+ delete(buildDir)
+ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment