Skip to content

Commit

Permalink
feat: update to Kotlin 2.0.0 RC3
Browse files Browse the repository at this point in the history
  • Loading branch information
svenjacobs committed May 20, 2024
1 parent 8517f5a commit 247bad6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
9 changes: 5 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ plugins {
id("com.android.application")
kotlin("android")
kotlin("plugin.parcelize")
id("org.jetbrains.kotlin.plugin.compose")
id("com.mikepenz.aboutlibraries.plugin")
alias(libs.plugins.triplet.play)
}
Expand Down Expand Up @@ -93,10 +94,6 @@ android {
buildConfig = true
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get()
}

testOptions {
unitTests.all {
it.useJUnitPlatform()
Expand All @@ -112,6 +109,10 @@ android {
}
}

composeCompiler {
enableStrongSkippingMode = true
}

play {
serviceAccountCredentials.set(rootProject.file("google-play-service-account.json"))
defaultToAppBundles.set(true)
Expand Down
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Léon - The URL Cleaner
* Copyright (C) 2023 Sven Jacobs
* Copyright (C) 2024 Sven Jacobs
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -30,6 +30,7 @@ buildscript {
dependencies {
classpath(libs.android.gradle.plugin)
classpath(libs.kotlin.gradle.plugin)
classpath(libs.compose.gradle.plugin)
classpath(libs.mikepenz.aboutlibraries.gradle.plugin)
}
}
Expand Down Expand Up @@ -58,8 +59,8 @@ subprojects {
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
compilerOptions {
freeCompilerArgs.addAll(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=androidx.lifecycle.compose.ExperimentalLifecycleComposeApi",
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Léon - The URL Cleaner
* Copyright (C) 2022 Sven Jacobs
* Copyright (C) 2024 Sven Jacobs
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -28,4 +28,5 @@ repositories {
dependencies {
implementation(libs.kotlin.gradle.plugin)
implementation(libs.android.gradle.plugin)
implementation(libs.compose.gradle.plugin)
}
10 changes: 5 additions & 5 deletions buildSrc/src/main/kotlin/android-library.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ val libs: VersionCatalog = catalogs.named("libs")
plugins {
id("com.android.library")
kotlin("android")
id("org.jetbrains.kotlin.plugin.compose")
}

android {
Expand All @@ -47,18 +48,17 @@ android {
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion =
libs.findVersion("androidx.compose.compiler").get().requiredVersion
}

testOptions {
unitTests.all {
it.useJUnitPlatform()
}
}
}

composeCompiler {
enableStrongSkippingMode = true
}

dependencies {
api(project(":core-common"))

Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
android-gradle-plugin = "8.4.0"
androidx-activity = "1.9.0"
androidx-compose-bom = "2024.05.00" # https://developer.android.com/jetpack/compose/bom/bom-mapping
androidx-compose-compiler = "1.5.14" # https://developer.android.com/jetpack/androidx/releases/compose-kotlin#pre-release_kotlin_compatibility
androidx-lifecycle = "2.8.0"
google-accompanist = "0.34.0"
kotest = "5.9.0"
kotlin = "1.9.24"
kotlin = "2.0.0-RC3"
kotlinx-coroutines = "1.8.1"
mikepenz-aboutlibraries = "11.1.4"

Expand Down Expand Up @@ -38,6 +37,7 @@ kotest-framework-api-jvm = { module = "io.kotest:kotest-framework-api-jvm", vers
kotest-runner-junit5 = { module = "io.kotest:kotest-runner-junit5", version.ref = "kotest" }
kotlin-bom = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
compose-gradle-plugin = { module = "org.jetbrains.kotlin.plugin.compose:org.jetbrains.kotlin.plugin.compose.gradle.plugin", version.ref = "kotlin" }
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8" }
kotlinx-collections-immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7"
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
Expand Down

0 comments on commit 247bad6

Please sign in to comment.