Skip to content

Commit

Permalink
chore: updated Kotlin to 2.0.0 (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoso authored Jun 11, 2024
1 parent 1a03452 commit 06d807d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 33 deletions.
7 changes: 2 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'com.android.application'
id 'kotlin-android'
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
alias libs.plugins.compose.compiler
}

android {
Expand Down Expand Up @@ -34,18 +35,14 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

composeOptions {
kotlinCompilerExtensionVersion libs.versions.composecompiler.get()
}

buildFeatures {
buildConfig true
compose true
}

kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
}
}

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = libs.versions.kotlin.get()
ext.compose_compiler_version = libs.versions.composecompiler.get()
ext.androidx_test_version = libs.versions.androidxtest.get()
repositories {
google()
Expand All @@ -18,6 +17,7 @@ buildscript {

plugins {
alias libs.plugins.dokka apply true
alias libs.plugins.compose.compiler apply false
}

ext.projectArtifactId = { project ->
Expand Down Expand Up @@ -124,5 +124,5 @@ subprojects { project ->
}

tasks.register('clean', Delete) {
delete rootProject.buildDir
delete rootProject.layout.buildDirectory
}
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ signing.secretKeyRingFile=
sonatypeUsername=
sonatypePassword=

android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
18 changes: 10 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[versions]
activitycompose = "1.9.0"
agp = "8.4.0"
agp = "8.4.1"
androidxtest = "1.5.0"
compose-bom = "2024.04.01"
composecompiler = "1.5.11"
compose-bom = "2024.05.00"
coroutines = "1.7.3"
dokka = "1.9.10"
dokka = "1.9.20"
espresso = "3.5.1"
jacoco-plugin = "0.2.1"
jacoco-tool-plugin = "0.8.7"
junitktx = "1.1.5"
junit = "4.13.2"
kotlin = "1.9.23"
material = "1.11.0"
kotlin = "2.0.0"
material = "1.12.0"
mapsktx = "5.0.0"
mapsecrets = "2.0.1"
android-core = "1.13.1"

[libraries]
android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "agp" }
Expand All @@ -25,7 +25,7 @@ androidx-compose-material = { module = "androidx.compose.material:material" }
androidx-compose-ui = { module = "androidx.compose.ui:ui" }
androidx-compose-ui-preview-tooling = { module = "androidx.compose.ui:ui-tooling-preview" }
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
androidx-core = { module = "androidx.core:core-ktx", version = "1.13.0" }
androidx-core = { module = "androidx.core:core-ktx", version = "android-core" }
androidx-test-compose-ui = { module = "androidx.compose.ui:ui-test-junit4" }
androidx-test-core = { module = "androidx.test:core", version.ref = "androidxtest" }
androidx-test-espresso = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" }
Expand All @@ -44,4 +44,6 @@ material = { module = "com.google.android.material:material", version.ref = "mat
test-junit = { module = "junit:junit", version.ref = "junit" }

[plugins]
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
org-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
7 changes: 2 additions & 5 deletions maps-compose-utils/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'kotlin-android'
alias libs.plugins.compose.compiler
}

android {
Expand All @@ -18,10 +19,6 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

composeOptions {
kotlinCompilerExtensionVersion libs.versions.composecompiler.get()
}

buildFeatures {
buildConfig false
compose true
Expand All @@ -30,7 +27,7 @@ android {
kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs += '-Xexplicit-api=strict'
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
}
}

Expand Down
7 changes: 2 additions & 5 deletions maps-compose-widgets/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'kotlin-android'
alias libs.plugins.compose.compiler
}

android {
Expand All @@ -18,10 +19,6 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

composeOptions {
kotlinCompilerExtensionVersion libs.versions.composecompiler.get()
}

buildFeatures {
buildConfig false
compose true
Expand All @@ -30,7 +27,7 @@ android {
kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs += '-Xexplicit-api=strict'
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
}
}

Expand Down
11 changes: 4 additions & 7 deletions maps-compose/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'kotlin-android'
alias libs.plugins.compose.compiler
}

android {
Expand All @@ -18,10 +19,6 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

composeOptions {
kotlinCompilerExtensionVersion libs.versions.composecompiler.get()
}

buildFeatures {
buildConfig false
compose true
Expand All @@ -30,7 +27,7 @@ android {
kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs += '-Xexplicit-api=strict'
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'

freeCompilerArgs += [
"-P",
Expand All @@ -42,14 +39,14 @@ android {
freeCompilerArgs += [
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.buildDir.absolutePath + "/compose_compiler"
project.layout.buildDirectory.absolutePath + "/compose_compiler"
]
}
if (findProperty("composeCompilerMetrics") == "true") {
freeCompilerArgs += [
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.buildDir.absolutePath + "/compose_compiler"
project.layout.buildDirectory.absolutePath + "/compose_compiler"
]
}
}
Expand Down

0 comments on commit 06d807d

Please sign in to comment.