Skip to content

Instantly share code, notes, and snippets.

@enginebai
Last active December 10, 2019 09:08
Show Gist options
  • Save enginebai/eb7b932ac87182f0e8872e1d9220b814 to your computer and use it in GitHub Desktop.
Save enginebai/eb7b932ac87182f0e8872e1d9220b814 to your computer and use it in GitHub Desktop.
Module-level build.gradle migration
-apply plugin: "com.android.application"
-apply plugin: "kotlin-android"
-apply plugin: "kotlin-android-extensions"
+plugins {
+ id("com.android.application")
+ id("kotlin-android")
+ id("kotlin-android-extensions")
+}
android {
- compileSdkVersion 29
+ compileSdkVersion(29)
defaultConfig {
- applicationId "com.enginebai.project.base"
- minSdkVersion 23
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ applicationId = "com.enginebai.project.base"
+ minSdkVersion(23)
+ targetSdkVersion(29)
+ versionCode = 1
+ versionName = "1.0"
+ testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
+ getByName("release") {
+ isMinifyEnabled = false
+ proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
}
dependencies {
+ implementation(fileTree("dir" to "libs", "include" to listOf("*.jar")))
+ implementation(Dependencies.kotlinStdLib)
+ implementation("androidx.appcompat:appcompat:1.1.0")
+ implementation("androidx.core:core-ktx:1.1.0")
+ implementation("androidx.constraintlayout:constraintlayout:1.1.3")
+ testImplementation("junit:junit:4.12")
+ androidTestImplementation("androidx.test:runner:1.2.0")
+ androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0")
- implementation fileTree(dir: "libs", include: ["*.jar"])
- implementation Dependencies.kotlinStdLib
- implementation "androidx.appcompat:appcompat:1.1.0"
- implementation "androidx.core:core-ktx:1.1.0"
- implementation "androidx.constraintlayout:constraintlayout:1.1.3"
- testImplementation "junit:junit:4.12"
- androidTestImplementation "androidx.test:runner:1.2.0"
- androidTestImplementation "androidx.test.espresso:espresso-core:3.2.0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment