From d0ecf5cc2e14f923607c8d2620eaa1ec9d29ccd0 Mon Sep 17 00:00:00 2001 From: nopdan Date: Fri, 24 May 2024 17:09:03 +0800 Subject: [PATCH] build: upgrade kotlin to 2 and more --- .../com/osfans/trime/ime/text/Candidate.kt | 6 +++--- gradle/libs.versions.toml | 21 +++++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/com/osfans/trime/ime/text/Candidate.kt b/app/src/main/java/com/osfans/trime/ime/text/Candidate.kt index 50fda720d6..02b7c3c87e 100644 --- a/app/src/main/java/com/osfans/trime/ime/text/Candidate.kt +++ b/app/src/main/java/com/osfans/trime/ime/text/Candidate.kt @@ -55,6 +55,9 @@ class Candidate(context: Context?, attrs: AttributeSet?) : View(context, attrs) Paint().apply { color = ColorManager.getColor("candidate_separator_color")!! } + private val candidateFont = FontManager.getTypeface("candidate_font") + private val symbolFont = FontManager.getTypeface("symbol_font") + private val commentFont = FontManager.getTypeface("comment_font") private val candidatePaint = Paint().apply { typeface = candidateFont @@ -76,9 +79,6 @@ class Candidate(context: Context?, attrs: AttributeSet?) : View(context, attrs) isAntiAlias = true strokeWidth = 0f } - private val candidateFont = FontManager.getTypeface("candidate_font") - private val symbolFont = FontManager.getTypeface("symbol_font") - private val commentFont = FontManager.getTypeface("comment_font") private val candidateTextColor = ColorManager.getColor("candidate_text_color")!! private val hilitedCandidateTextColor = ColorManager.getColor("hilited_candidate_text_color")!! private val commentTextColor = ColorManager.getColor("comment_text_color")!! diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d140d0313e..3b26acc7bf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,23 +1,23 @@ [versions] androidGradlePlugin = "8.3.2" -kotlin = "1.9.20" -ksp = "1.9.20-1.0.14" -navigation = "2.7.5" +kotlin = "2.0.0" +ksp = "2.0.0-1.0.21" +navigation = "2.7.7" room = "2.6.1" splitties = "3.0.0" -aboutlibraries = "10.9.2" +aboutlibraries = "11.1.3" kotest = "5.8.0" kotlin-inject = "0.6.3" [libraries] android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" } kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" } -kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version = "1.7.3" } -kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.6.1" } -androidx-activity = { module = "androidx.activity:activity-ktx", version = "1.8.1" } +kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version = "1.8.0" } +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.6.3" } +androidx-activity = { module = "androidx.activity:activity-ktx", version = "1.9.0" } androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.6.1" } androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version = "2.1.4" } -androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.12.0" } +androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.13.1" } androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigation" } androidx-navigation-ui = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigation" } androidx-preference = { module = "androidx.preference:preference-ktx", version = "1.2.1" } @@ -25,7 +25,7 @@ androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" } androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" } androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" } -androidx-viewpager2 = { module = "androidx.viewpager2:viewpager2", version = "1.1.0-beta02" } +androidx-viewpager2 = { module = "androidx.viewpager2:viewpager2", version = "1.1.0" } flexbox = { module = "com.google.android.flexbox:flexbox", version = "3.0.0" } kaml = { module = "com.charleskorn.kaml:kaml", version = "0.56.0" } timber = { module = "com.jakewharton.timber:timber", version = "5.0.1" } @@ -41,9 +41,8 @@ splitties-views-dsl-coordinatorlayout = { module = "com.louiscad.splitties:split splitties-views-dsl-recyclerview = { module = "com.louiscad.splitties:splitties-views-dsl-recyclerview", version.ref = "splitties" } splitties-views-recyclerview = { module = "com.louiscad.splitties:splitties-views-recyclerview", version.ref = "splitties" } aboutlibraries-core = { module = "com.mikepenz:aboutlibraries-core", version.ref = "aboutlibraries" } -aboutlibraries-plugin = { module = "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin", version.ref = "aboutlibraries" } junit = { module = "junit:junit", version = "4.13.2" } -kotlinpoet-ksp = { module = "com.squareup:kotlinpoet-ksp", version = "1.14.2" } +kotlinpoet-ksp = { module = "com.squareup:kotlinpoet-ksp", version = "1.16.0" } ksp = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" } kotest-runner-junit5 = { module = "io.kotest:kotest-runner-junit5", version.ref = "kotest" } kotest-assertions-core = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" }