Update Kotlin to 2.0.0 (#276)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,3 +8,4 @@
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
.kotlin
|
||||
@@ -9,6 +9,7 @@ class AndroidApplicationComposeConventionPlugin : Plugin<Project> {
|
||||
override fun apply(target: Project) {
|
||||
with(target) {
|
||||
pluginManager.apply("com.android.application")
|
||||
pluginManager.apply("org.jetbrains.kotlin.plugin.compose")
|
||||
|
||||
extensions.configure<BaseAppModuleExtension> {
|
||||
configureAndroidCompose(this)
|
||||
|
||||
@@ -8,6 +8,8 @@ class AndroidLibraryComposeConventionPlugin : Plugin<Project> {
|
||||
|
||||
override fun apply(target: Project) {
|
||||
with(target) {
|
||||
pluginManager.apply("org.jetbrains.kotlin.plugin.compose")
|
||||
|
||||
extensions.configure<LibraryExtension> {
|
||||
configureAndroidCompose(this)
|
||||
}
|
||||
|
||||
@@ -20,11 +20,6 @@ internal fun Project.configureAndroidCompose(
|
||||
compose = true
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
val version = libs.findVersion("composeKotlinCompilerExtension")
|
||||
kotlinCompilerExtensionVersion = version.get().toString()
|
||||
}
|
||||
|
||||
// Add compose-destinations generated code to Gradle source sets
|
||||
variants.all {
|
||||
kotlin.sourceSets {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package gq.kirmanak.mealient
|
||||
|
||||
import com.android.build.api.dsl.CommonExtension
|
||||
import org.gradle.api.Action
|
||||
import org.gradle.api.NamedDomainObjectContainer
|
||||
import org.gradle.api.Project
|
||||
@@ -8,7 +7,6 @@ import org.gradle.api.artifacts.MinimalExternalModuleDependency
|
||||
import org.gradle.api.plugins.ExtensionAware
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
|
||||
|
||||
internal val Project.kotlin: KotlinAndroidProjectExtension
|
||||
@@ -24,6 +22,3 @@ internal fun Project.library(name: String): Provider<MinimalExternalModuleDepend
|
||||
return libs.findLibrary(name).get()
|
||||
}
|
||||
|
||||
internal fun CommonExtension<*, *, *, *, *, *>.kotlinOptions(block: KotlinJvmOptions.() -> Unit) {
|
||||
(this as ExtensionAware).extensions.configure("kotlinOptions", block)
|
||||
}
|
||||
|
||||
@@ -20,10 +20,6 @@ internal fun Project.configureKotlinAndroid(
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
freeCompilerArgs = freeCompilerArgs + listOf("-opt-in=kotlin.RequiresOptIn")
|
||||
}
|
||||
|
||||
lint {
|
||||
disable += listOf(
|
||||
"ObsoleteLintCustomCheck",
|
||||
|
||||
@@ -17,6 +17,7 @@ plugins {
|
||||
alias(libs.plugins.sonarqube)
|
||||
alias(libs.plugins.ksp) apply false
|
||||
alias(libs.plugins.kover) apply false
|
||||
alias(libs.plugins.compose.compiler) apply false
|
||||
}
|
||||
|
||||
sonarqube {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# https://maven.google.com/web/index.html?q=com.android.tools.build#com.android.tools.build:gradle
|
||||
androidGradlePlugin = "8.5.0"
|
||||
# https://github.com/JetBrains/kotlin/releases
|
||||
kotlin = "1.9.22"
|
||||
kotlin = "2.0.0"
|
||||
# https://dagger.dev/hilt/gradle-setup
|
||||
hilt = "2.51.1"
|
||||
# https://github.com/protocolbuffers/protobuf/releases
|
||||
@@ -54,7 +54,7 @@ chucker = "4.0.0"
|
||||
# https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md
|
||||
desugar = "2.0.4"
|
||||
# https://github.com/google/ksp/releases
|
||||
kspPlugin = "1.9.22-1.0.17"
|
||||
kspPlugin = "2.0.0-1.0.22"
|
||||
# https://developer.android.com/jetpack/androidx/releases/sharetarget
|
||||
shareTarget = "1.2.0"
|
||||
# https://github.com/KasperskyLab/Kaspresso/releases
|
||||
@@ -67,8 +67,6 @@ androidXTestOrchestrator = "1.4.2"
|
||||
junitKtx = "1.2.1"
|
||||
# https://mvnrepository.com/artifact/androidx.compose/compose-bom
|
||||
composeBom = "2024.03.00"
|
||||
# https://developer.android.com/jetpack/androidx/releases/compose-kotlin
|
||||
composeKotlinCompilerExtension = "1.5.9"
|
||||
# https://google.github.io/accompanist/
|
||||
accompanistVersion = "0.34.0"
|
||||
# https://developer.android.com/jetpack/androidx/releases/compose-material
|
||||
@@ -191,3 +189,4 @@ sonarqube = { id = "org.sonarqube", version.ref = "sonarqube" }
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "kspPlugin" }
|
||||
protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" }
|
||||
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
|
||||
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
||||
Reference in New Issue
Block a user