Skip to content

Commit cf569fb

Browse files
committed
Update kotlin gradle DSL
1 parent 8b78a05 commit cf569fb

File tree

4 files changed

+29
-26
lines changed

4 files changed

+29
-26
lines changed
Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
11
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
22

33
plugins {
4-
id 'com.android.application'
5-
id 'org.jetbrains.kotlin.android'
6-
id 'kotlin-kapt'
4+
alias(libs.plugins.android.application)
5+
alias(libs.plugins.kotlin.android)
6+
id("kotlin-kapt")
77
alias(libs.plugins.kotlin.compose)
88
alias(libs.plugins.kotlin.serialization)
99
}
1010

1111
android {
12-
namespace 'com.pluu.lintstudy'
12+
namespace = "com.pluu.lintstudy"
1313
compileSdk {
1414
version = release(36)
1515
}
1616

1717
defaultConfig {
18-
applicationId "com.pluu.lintstudy"
19-
minSdk 21
20-
targetSdk 36
21-
versionCode 1
22-
versionName "1.0"
18+
applicationId = "com.pluu.lintstudy"
19+
minSdk = 21
20+
targetSdk = 36
21+
versionCode = 1
22+
versionName = "1.0"
2323

24-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
24+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2525
}
2626

2727
buildTypes {
2828
release {
29-
minifyEnabled false
30-
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
29+
isMinifyEnabled = false
30+
proguardFiles(
31+
getDefaultProguardFile("proguard-android-optimize.txt"),
32+
"proguard-rules.pro"
33+
)
3134
}
3235
}
3336
compileOptions {
34-
sourceCompatibility JavaVersion.VERSION_17
35-
targetCompatibility JavaVersion.VERSION_17
37+
sourceCompatibility = JavaVersion.VERSION_17
38+
targetCompatibility = JavaVersion.VERSION_17
3639
}
3740

3841
buildFeatures {
@@ -41,8 +44,8 @@ android {
4144
}
4245

4346
lint {
44-
checkDependencies true
45-
ignoreTestSources true
47+
checkDependencies = true
48+
ignoreTestSources = true
4649
}
4750
}
4851

@@ -53,7 +56,7 @@ kotlin {
5356
}
5457

5558
dependencies {
56-
lintChecks project(':lint')
59+
lintChecks(project(":lint"))
5760

5861
implementation(libs.androidx.activity)
5962
implementation(libs.androidx.activity.compose)
@@ -66,8 +69,8 @@ dependencies {
6669
androidTestImplementation(libs.androidx.test.junit)
6770
androidTestImplementation(libs.androidx.test.espresso)
6871

69-
implementation libs.timber
70-
implementation libs.kotlinx.serialization.json
72+
implementation(libs.timber)
73+
implementation(libs.kotlinx.serialization.json)
7174

7275
implementation(platform(libs.androidX.compose.bom))
7376
implementation(libs.bundles.androidX.compose)

app/proguard-rules.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Add project specific ProGuard rules here.
22
# You can control the set of applied configuration files using the
3-
# proguardFiles setting in build.gradle.
3+
# proguardFiles setting in build.gradle.kts.
44
#
55
# For more details, see
66
# http://developer.android.com/guide/developing/tools/proguard.html

build.gradle renamed to build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
alias(libs.plugins.kotlin.serialization) apply false
88
}
99

10-
tasks.register('clean', Delete) {
11-
delete rootProject.buildDir
12-
finalizedBy(':lint:assemble')
10+
tasks.register<Delete>("clean") {
11+
delete(rootProject.buildDir)
12+
finalizedBy(":lint:assemble")
1313
}

settings.gradle renamed to settings.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ dependencyResolutionManagement {
1919
}
2020
}
2121

22-
include ':lint'
23-
include ':app'
24-
rootProject.name = "LintStudy"
22+
rootProject.name = "LintStudy"
23+
include(":lint")
24+
include(":app")

0 commit comments

Comments
 (0)