mirror of
https://github.com/bitwarden/android.git
synced 2024-11-21 17:05:44 +03:00
Update to Kotlin 2.0.0 (#1397)
This commit is contained in:
parent
6ff39e486d
commit
48906ae207
5 changed files with 16 additions and 13 deletions
1
.github/renovate.json
vendored
1
.github/renovate.json
vendored
|
@ -35,7 +35,6 @@
|
||||||
"groupName": "kotlin",
|
"groupName": "kotlin",
|
||||||
"description": "Kotlin and Compose dependencies that must be updated together to maintain compatibility.",
|
"description": "Kotlin and Compose dependencies that must be updated together to maintain compatibility.",
|
||||||
"matchPackagePatterns": [
|
"matchPackagePatterns": [
|
||||||
"androidx.compose.compiler:compiler",
|
|
||||||
"androidx.compose:compose-bom",
|
"androidx.compose:compose-bom",
|
||||||
"org.jetbrains.kotlin.*",
|
"org.jetbrains.kotlin.*",
|
||||||
"com.google.devtools.ksp"
|
"com.google.devtools.ksp"
|
||||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -7,6 +7,9 @@ fastlane/README.md
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
|
# Kotlin
|
||||||
|
.kotlin/
|
||||||
|
|
||||||
# Gradle build cache
|
# Gradle build cache
|
||||||
/build-cache/
|
/build-cache/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import com.google.firebase.crashlytics.buildtools.gradle.tasks.InjectMappingFileIdTask
|
import com.google.firebase.crashlytics.buildtools.gradle.tasks.InjectMappingFileIdTask
|
||||||
import com.google.firebase.crashlytics.buildtools.gradle.tasks.UploadMappingFileTask
|
import com.google.firebase.crashlytics.buildtools.gradle.tasks.UploadMappingFileTask
|
||||||
import com.google.gms.googleservices.GoogleServicesTask
|
import com.google.gms.googleservices.GoogleServicesTask
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
|
@ -10,6 +11,7 @@ plugins {
|
||||||
alias(libs.plugins.detekt)
|
alias(libs.plugins.detekt)
|
||||||
alias(libs.plugins.hilt)
|
alias(libs.plugins.hilt)
|
||||||
alias(libs.plugins.kotlin.android)
|
alias(libs.plugins.kotlin.android)
|
||||||
|
alias(libs.plugins.kotlin.compose.compiler)
|
||||||
alias(libs.plugins.kotlin.parcelize)
|
alias(libs.plugins.kotlin.parcelize)
|
||||||
alias(libs.plugins.kotlin.serialization)
|
alias(libs.plugins.kotlin.serialization)
|
||||||
alias(libs.plugins.kotlinx.kover)
|
alias(libs.plugins.kotlinx.kover)
|
||||||
|
@ -90,16 +92,10 @@ android {
|
||||||
sourceCompatibility(libs.versions.jvmTarget.get())
|
sourceCompatibility(libs.versions.jvmTarget.get())
|
||||||
targetCompatibility(libs.versions.jvmTarget.get())
|
targetCompatibility(libs.versions.jvmTarget.get())
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = libs.versions.jvmTarget.get()
|
|
||||||
}
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
buildConfig = true
|
buildConfig = true
|
||||||
compose = true
|
compose = true
|
||||||
}
|
}
|
||||||
composeOptions {
|
|
||||||
kotlinCompilerExtensionVersion = libs.versions.kotlinCompilerExtensionVersion.get()
|
|
||||||
}
|
|
||||||
packaging {
|
packaging {
|
||||||
resources {
|
resources {
|
||||||
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||||
|
@ -113,6 +109,12 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
fun standardImplementation(dependencyNotation: Any) {
|
fun standardImplementation(dependencyNotation: Any) {
|
||||||
add("standardImplementation", dependencyNotation)
|
add("standardImplementation", dependencyNotation)
|
||||||
|
|
|
@ -2,6 +2,7 @@ plugins {
|
||||||
alias(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
alias(libs.plugins.hilt) apply false
|
alias(libs.plugins.hilt) apply false
|
||||||
alias(libs.plugins.kotlin.android) apply false
|
alias(libs.plugins.kotlin.android) apply false
|
||||||
|
alias(libs.plugins.kotlin.compose.compiler) apply false
|
||||||
alias(libs.plugins.kotlin.parcelize) apply false
|
alias(libs.plugins.kotlin.parcelize) apply false
|
||||||
alias(libs.plugins.kotlinx.kover) apply false
|
alias(libs.plugins.kotlinx.kover) apply false
|
||||||
alias(libs.plugins.ksp) apply false
|
alias(libs.plugins.ksp) apply false
|
||||||
|
|
|
@ -33,16 +33,13 @@ googleServices = "4.4.1"
|
||||||
hilt = "2.51.1"
|
hilt = "2.51.1"
|
||||||
junit5 = "5.10.2"
|
junit5 = "5.10.2"
|
||||||
jvmTarget = "17"
|
jvmTarget = "17"
|
||||||
# kotlin and kotlinCompileExtensions **must** use compatible versions. Do not update either without
|
# kotlin and ksp **must** use compatible versions, do not update either without the other.
|
||||||
# first checking the Compose to Kotlin Compatibility Map.
|
kotlin = "2.0.0"
|
||||||
# https://developer.android.com/jetpack/androidx/releases/compose-kotlin
|
|
||||||
kotlin = "1.9.24"
|
|
||||||
kotlinCompilerExtensionVersion = "1.5.14"
|
|
||||||
kotlinxCollectionsImmutable = "0.3.7"
|
kotlinxCollectionsImmutable = "0.3.7"
|
||||||
kotlinxCoroutines = "1.8.1"
|
kotlinxCoroutines = "1.8.1"
|
||||||
kotlinxSerialization = "1.6.3"
|
kotlinxSerialization = "1.6.3"
|
||||||
kotlinxKover = "0.8.0"
|
kotlinxKover = "0.8.0"
|
||||||
ksp = "1.9.24-1.0.20"
|
ksp = "2.0.0-1.0.21"
|
||||||
mockk = "1.13.11"
|
mockk = "1.13.11"
|
||||||
okhttp = "4.12.0"
|
okhttp = "4.12.0"
|
||||||
retrofitBom = "2.11.0"
|
retrofitBom = "2.11.0"
|
||||||
|
@ -120,6 +117,7 @@ detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
|
||||||
google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" }
|
google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" }
|
||||||
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
|
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
|
||||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||||
|
kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
||||||
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
|
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
|
||||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||||
kotlinx-kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kotlinxKover" }
|
kotlinx-kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kotlinxKover" }
|
||||||
|
|
Loading…
Reference in a new issue