Skip to content

Commit a870287

Browse files
committed
Converted android example to use Kotlin Gradle DSL
1 parent b073b29 commit a870287

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed
Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
apply plugin: 'com.android.application'
2-
3-
apply plugin: 'kotlin-android'
4-
5-
apply plugin: 'kotlin-android-extensions'
6-
7-
apply plugin: 'kotlin-kapt'
8-
1+
plugins {
2+
id("com.android.application")
3+
kotlin("android")
4+
kotlin("android.extensions")
5+
kotlin("kapt")
6+
}
97

108
android {
11-
compileOptions {
12-
sourceCompatibility = JavaVersion.VERSION_1_8
13-
targetCompatibility = JavaVersion.VERSION_1_8
14-
}
159
compileSdkVersion(29)
1610
defaultConfig {
1711
applicationId = "org.reduxkotlin.example.counter"
@@ -21,27 +15,30 @@ android {
2115
versionName = "1.0"
2216
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2317
}
18+
compileOptions {
19+
sourceCompatibility = JavaVersion.VERSION_1_8
20+
targetCompatibility = JavaVersion.VERSION_1_8
21+
}
2422
buildTypes {
25-
release {
26-
minifyEnabled = false
27-
proguardFiles(getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro')
23+
getByName("release") {
24+
isMinifyEnabled = false
25+
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
2826
}
29-
debug {
27+
getByName("debug") {
3028
// MPP libraries don't currently get this resolution automatically
31-
matchingFallbacks = ['release']
29+
matchingFallbacks = listOf("release")
3230
}
3331
}
3432
packagingOptions {
35-
exclude 'META-INF/*.kotlin_module'
33+
exclude("META-INF/*.kotlin_module")
3634
}
37-
tasks.lint.enabled = false
3835
}
3936

4037

4138
dependencies {
4239
implementation(Libs.kotlin_stdlib_jdk8)
4340
implementation(Libs.appcompat)
4441

45-
implementation(project(':examples:counter:common'))
46-
implementation(project(':lib'))
42+
implementation(project(":examples:counter:common"))
43+
implementation(project(":lib"))
4744
}

0 commit comments

Comments
 (0)