Skip to content

Commit f733dda

Browse files
committed
chore: add Kotlin support and dependencies
This commit introduces Kotlin to the project build configuration. * Defines `kotlin_version` as 2.1.0 in the root `build.gradle`. * Adds the `kotlin-gradle-plugin` to the root buildscript dependencies. * Applies the `kotlin-android` plugin in `app/build.gradle`. * Configures `kotlinOptions` with a JVM target of 17. * Adds the `kotlin-stdlib` dependency to the app module.
1 parent 56fe608 commit f733dda

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

app/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'com.android.application'
33
id 'com.google.gms.google-services'
4+
id 'kotlin-android'
45
}
56

67
def BUILD_DATE = getBuildDate()
@@ -62,6 +63,10 @@ android {
6263
targetCompatibility JavaVersion.VERSION_17
6364
}
6465

66+
kotlinOptions {
67+
jvmTarget = "17"
68+
}
69+
6570
buildFeatures {
6671
buildConfig true
6772
viewBinding true
@@ -82,4 +87,6 @@ dependencies {
8287
implementation 'com.google.firebase:firebase-analytics'
8388

8489
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
90+
91+
implementation 'org.jetbrains.kotlin:kotlin-stdlib:2.1.0'
8592
}

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3+
ext.kotlin_version = "2.1.0"
34
repositories {
45
google()
56
mavenCentral()
@@ -10,6 +11,7 @@ buildscript {
1011

1112
// NOTE: Do not place your application dependencies here; they belong
1213
// in the individual module build.gradle files
14+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1315
}
1416
}
1517

0 commit comments

Comments
 (0)