Upgrade Kotlin to v2.0 (#3594)
* Bump Kotlin to v2.0 * Fix lots of issues due to the upgrade: lint issues, function signature incompatibilities, broken tests, etc. --------- Co-authored-by: Benoit Marty <benoit@matrix.org>
This commit is contained in:
parent
63074cb3b0
commit
366db4791b
27 changed files with 93 additions and 69 deletions
|
|
@ -10,7 +10,6 @@ package extension
|
|||
import Versions
|
||||
import com.android.build.api.dsl.CommonExtension
|
||||
import isEnterpriseBuild
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
import org.gradle.api.Project
|
||||
import java.io.File
|
||||
|
||||
|
|
@ -44,21 +43,18 @@ fun CommonExtension<*, *, *, *, *, *>.androidConfig(project: Project) {
|
|||
}
|
||||
checkDependencies = false
|
||||
abortOnError = true
|
||||
ignoreTestSources = true
|
||||
ignoreTestFixturesSources = true
|
||||
checkGeneratedSources = false
|
||||
}
|
||||
}
|
||||
|
||||
fun CommonExtension<*, *, *, *, *, *>.composeConfig(libs: LibrariesForLibs) {
|
||||
fun CommonExtension<*, *, *, *, *, *>.composeConfig() {
|
||||
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = libs.versions.composecompiler.get()
|
||||
}
|
||||
|
||||
packaging {
|
||||
resources.excludes.apply {
|
||||
add("META-INF/AL2.0")
|
||||
|
|
|
|||
|
|
@ -19,11 +19,12 @@ plugins {
|
|||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
id("com.autonomousapps.dependency-analysis")
|
||||
id("org.jetbrains.kotlin.plugin.compose")
|
||||
}
|
||||
|
||||
android {
|
||||
androidConfig(project)
|
||||
composeConfig(libs)
|
||||
composeConfig()
|
||||
compileOptions {
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,11 +19,12 @@ plugins {
|
|||
id("com.android.library")
|
||||
id("kotlin-android")
|
||||
id("com.autonomousapps.dependency-analysis")
|
||||
id("org.jetbrains.kotlin.plugin.compose")
|
||||
}
|
||||
|
||||
android {
|
||||
androidConfig(project)
|
||||
composeConfig(libs)
|
||||
composeConfig()
|
||||
compileOptions {
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue