Skip to content

Commit 0c9aac7

Browse files
author
rivaldy
committed
🔨 migrate from groovy to kotlin dsl
1 parent 4dd4459 commit 0c9aac7

File tree

6 files changed

+58
-50
lines changed

6 files changed

+58
-50
lines changed

.idea/kotlinScripting.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 0 additions & 43 deletions
This file was deleted.

app/build.gradle.kts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
plugins {
2+
id("com.android.application")
3+
id("kotlin-android")
4+
}
5+
6+
android {
7+
compileSdk = 31
8+
9+
defaultConfig {
10+
applicationId = "com.rivaldy.id.cocktail"
11+
minSdk = 23
12+
targetSdk = 31
13+
versionCode = 1
14+
versionName = "1.0"
15+
16+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
17+
}
18+
19+
buildTypes {
20+
getByName("release") {
21+
isMinifyEnabled = false
22+
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
23+
}
24+
}
25+
compileOptions {
26+
sourceCompatibility = JavaVersion.VERSION_11
27+
targetCompatibility = JavaVersion.VERSION_11
28+
}
29+
kotlinOptions {
30+
jvmTarget = JavaVersion.VERSION_11.toString()
31+
}
32+
buildFeatures {
33+
viewBinding = true
34+
}
35+
}
36+
37+
dependencies {
38+
39+
implementation("androidx.core:core-ktx:1.7.0")
40+
implementation("androidx.appcompat:appcompat:1.4.0")
41+
implementation("com.google.android.material:material:1.4.0")
42+
implementation("androidx.constraintlayout:constraintlayout:2.1.2")
43+
testImplementation("junit:junit:4.13.2")
44+
androidTestImplementation("androidx.test.ext:junit:1.1.3")
45+
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
46+
}

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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath "com.android.tools.build:gradle:7.0.3"
9-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"
8+
classpath("com.android.tools.build:gradle:7.0.4")
9+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20")
1010

1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files
1313
}
1414
}
1515

16-
task clean(type: Delete) {
17-
delete rootProject.buildDir
16+
tasks.register(name = "type", type = Delete::class) {
17+
delete(rootProject.buildDir)
1818
}

settings.gradle renamed to settings.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ dependencyResolutionManagement {
33
repositories {
44
google()
55
mavenCentral()
6-
jcenter() // Warning: this repository is going to shut down soon
76
}
87
}
98
rootProject.name = "Cocktail MVVM"
10-
include ':app'
9+
include (":app")

0 commit comments

Comments
 (0)