summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-04-10 16:00:07 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2023-04-10 16:20:59 +0530
commit5e3c08f1da0adb22eee616b8695bdf5b446205e0 (patch)
tree3e4918a8a9942585c72d9d3cb89c9aafd4559eb9
parent5ab0c53d0396669ea17eea5c18937b5300b1f437 (diff)
feat(deps): migrate to Kotlin 1.8.20
-rw-r--r--.idea/kotlinc.xml2
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt15
-rw-r--r--gradle.properties2
-rw-r--r--gradle/libs.versions.toml4
-rw-r--r--settings.gradle.kts5
5 files changed, 18 insertions, 10 deletions
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
index 0fc31131..69e86158 100644
--- a/.idea/kotlinc.xml
+++ b/.idea/kotlinc.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
- <option name="version" value="1.8.10" />
+ <option name="version" value="1.8.20" />
</component>
</project> \ No newline at end of file
diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt
index 763b37d3..e7ca2219 100644
--- a/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt
+++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt
@@ -16,6 +16,8 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.withType
import org.gradle.language.base.plugins.LifecycleBasePlugin
+import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@Suppress("Unused")
@@ -43,11 +45,13 @@ class KotlinCommonPlugin : Plugin<Project> {
targetCompatibility = JavaVersion.VERSION_11.toString()
}
withType<KotlinCompile>().configureEach {
- kotlinOptions {
- allWarningsAsErrors = true
- jvmTarget = JavaVersion.VERSION_11.toString()
- freeCompilerArgs = freeCompilerArgs + ADDITIONAL_COMPILER_ARGS
- languageVersion = "1.5"
+ kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() }
+ }
+ withType<KotlinCompilationTask<*>>().configureEach {
+ compilerOptions {
+ allWarningsAsErrors.set(true)
+ languageVersion.set(KotlinVersion.KOTLIN_1_5)
+ freeCompilerArgs.addAll(ADDITIONAL_COMPILER_ARGS)
}
}
withType<Test>().configureEach {
@@ -61,6 +65,7 @@ class KotlinCommonPlugin : Plugin<Project> {
private val ADDITIONAL_COMPILER_ARGS =
listOf(
"-opt-in=kotlin.RequiresOptIn",
+ "-Xsuppress-version-warnings",
)
}
}
diff --git a/gradle.properties b/gradle.properties
index 4fea4906..c6996006 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -28,7 +28,7 @@ kapt.incremental.apt=true
kapt.include.compile.classpath=false
# New incremental compilation for Kotlin
-kotlin.incremental.useClasspathSnapshot=true
+kotlin.compiler.preciseCompilationResultsBackup=true
kotlin.build.report.output=file
# Use R8 instead of ProGuard for code shrinking.
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 4e63881d..47cb1401 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -3,11 +3,11 @@ agp = "7.4.2"
androidxActivity = "1.7.0"
bouncycastle = "1.72"
# @keep used for kotlinCompilerExtensionVersion
-composeCompiler = "1.4.4"
+composeCompiler = "1.4.4-dev-k1.8.20-f6ae19e64ff"
coroutines = "1.6.4"
flowbinding = "1.2.0"
hilt = "2.45"
-kotlin = "1.8.10"
+kotlin = "1.8.20"
leakcanary = "2.10"
lifecycle = "2.6.1"
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 13c7212a..4f36ad2c 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -78,7 +78,6 @@ dependencyResolutionManagement {
includeGroup("androidx.cardview")
includeGroup("androidx.collection")
includeGroup("androidx.compose.animation")
- includeGroup("androidx.compose.compiler")
includeGroup("androidx.compose.foundation")
includeGroup("androidx.compose.material")
includeGroup("androidx.compose.material3")
@@ -155,6 +154,10 @@ dependencyResolutionManagement {
forRepository { maven("https://storage.googleapis.com/r8-releases/raw") }
filter { includeModule("com.android.tools", "r8") }
}
+ exclusiveContent {
+ forRepository { maven("https://androidx.dev/storage/compose-compiler/repository/") }
+ filter { includeGroup("androidx.compose.compiler") }
+ }
mavenCentral()
}
}