Skip to content

Commit c685cb1

Browse files
committed
update kotlin to 1.9.20 & compose to 1.5.10
1 parent 1986d8b commit c685cb1

12 files changed

Lines changed: 142 additions & 167 deletions

File tree

build.gradle.kts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,3 @@ plugins {
1212
alias(libs.plugins.gms).apply(false)
1313
alias(libs.plugins.crashlytics).apply(false)
1414
}
15-
16-
extra["hasXcode15"] = hasXcode15() //TODO: remove after update Kotlin >= 1.9.10
17-
18-
fun hasXcode15(): Boolean = try {
19-
val process: Process = ProcessBuilder("xcodebuild", "-version").start()
20-
process.inputStream.bufferedReader().use { reader ->
21-
process.waitFor() == 0 && reader.readText().startsWith("Xcode 15.")
22-
}
23-
} catch (t: Throwable) {
24-
t.printStackTrace()
25-
false
26-
}

desktop-compose-app/build.gradle.kts

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,26 @@ kotlin {
1313
kotlinOptions.jvmTarget = "11"
1414
}
1515
}
16+
applyDefaultHierarchyTemplate()
17+
1618
sourceSets {
1719
all {
1820
languageSettings.optIn("kotlin.RequiresOptIn")
1921
}
20-
val jvmMain by getting {
21-
dependencies {
22-
implementation(project(":shared"))
23-
implementation(project(":shared-compose-ui"))
24-
implementation(libs.decompose)
25-
implementation(libs.decompose.extComposeJb)
26-
implementation(libs.coroutines.swing)
27-
implementation(compose.desktop.currentOs)
28-
implementation(libs.koin.core.jvm)
29-
}
22+
jvmMain.dependencies {
23+
implementation(project(":shared"))
24+
implementation(project(":shared-compose-ui"))
25+
implementation(libs.decompose)
26+
implementation(libs.decompose.extComposeJb)
27+
implementation(libs.coroutines.swing)
28+
implementation(compose.desktop.currentOs)
29+
implementation(libs.koin.core.jvm)
3030
}
31-
val jvmTest by getting {
32-
dependencies {
33-
implementation(project(":jvm-compose-test"))
34-
implementation(kotlin("test"))
35-
implementation(compose.desktop.uiTestJUnit4)
36-
implementation(compose.desktop.currentOs)
37-
}
31+
jvmTest.dependencies {
32+
implementation(project(":jvm-compose-test"))
33+
implementation(kotlin("test"))
34+
implementation(compose.desktop.uiTestJUnit4)
35+
implementation(compose.desktop.currentOs)
3836
}
3937
}
4038
}
@@ -51,4 +49,4 @@ compose {
5149
}
5250
}
5351
}
54-
}
52+
}

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ org.gradle.configureondemand=true
55
org.gradle.caching=true
66

77
kotlin.code.style=official
8-
kotlin.native.cacheKind=none
98
#kotlin.native.binary.memoryModel=experimental
109
#kotlin.native.enableDependencyPropagation=false
1110
#kotlin.mpp.enableGranularSourceSetsMetadata=true

gradle/libs.versions.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ compileSdk = "34"
33
targetSdk = "34"
44
minSdk = "21"
55

6-
kotlin = "1.8.22"
6+
kotlin = "1.9.20"
77
agp = "8.1.3"
88
gms = "4.3.15"
99
crashlytics = "2.9.8"
10-
compose = "1.5.3"
11-
composeCompiler = "1.4.8"
10+
compose = "1.5.10"
11+
composeCompiler = "1.5.3"
1212
coroutines = "1.7.3"
1313
sqlDelight = "2.0.0"
1414
androidxSqlite = "2.4.0"
@@ -21,8 +21,8 @@ koin = "3.4.3"
2121
kotlinx-datetime = "0.4.1"
2222
napier = "2.6.1"
2323
mokoResources = "0.23.0"
24-
materialThemePrefs = "0.5.9"
25-
androidxActivityCompose = "1.8.0"
24+
materialThemePrefs = "0.6.0"
25+
androidxActivityCompose = "1.8.1"
2626
androidxComposeTest = "1.5.4"
2727
androidxCoreSplashscreen = "1.0.1"
2828
androidxLegacySupport = "1.0.0"
@@ -34,13 +34,13 @@ androidxTestExt = "1.1.5"
3434
androidxTest = "1.5.2"
3535
androidxTestOrchestrator = "1.4.2"
3636
googleAndroidMaterial = "1.10.0"
37-
firebase = "32.5.0"
37+
firebase = "32.6.0"
3838
leakCanary = "2.12"
3939
junit = "4.13.2"
4040
mockito = "5.2.0"
4141
turbine = "1.0.0"
4242
espresso = "3.5.1"
43-
desugar = "2.0.3"
43+
desugar = "2.0.4"
4444

4545
[libraries]
4646
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }

ios-compose-kit/build.gradle.kts

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ compose {
77
kotlinCompilerPlugin.set(libs.versions.composeCompiler.get())
88
}
99
kotlin {
10-
iosX64()
1110
iosArm64()
1211
iosSimulatorArm64()
12+
applyDefaultHierarchyTemplate()
1313

1414
cocoapods {
1515
name = "iosComposePod"
@@ -22,33 +22,21 @@ kotlin {
2222
framework {
2323
baseName = "iosComposeKit"
2424
isStatic = true
25-
if (rootProject.extra["hasXcode15"] == true) linkerOpts += "-ld64" //TODO: remove after update Kotlin >= 1.9.10
2625
export(project(":shared"))
2726
export(libs.mokoResources)
2827
export(libs.koin.core)
2928
}
3029
}
3130
sourceSets {
32-
val commonMain by getting {
33-
dependencies {
34-
api(project(":shared"))
35-
api(project(":shared-compose-ui"))
36-
implementation(compose.ui)
37-
implementation(compose.foundation)
38-
implementation(compose.material)
39-
implementation(compose.runtime)
40-
api(libs.mokoResources)
41-
api(libs.koin.core)
42-
}
43-
}
44-
val iosX64Main by getting
45-
val iosArm64Main by getting
46-
val iosSimulatorArm64Main by getting
47-
val iosMain by creating {
48-
dependsOn(commonMain)
49-
iosX64Main.dependsOn(this)
50-
iosArm64Main.dependsOn(this)
51-
iosSimulatorArm64Main.dependsOn(this)
31+
commonMain.dependencies {
32+
api(project(":shared"))
33+
api(project(":shared-compose-ui"))
34+
implementation(compose.ui)
35+
implementation(compose.foundation)
36+
implementation(compose.material)
37+
implementation(compose.runtime)
38+
api(libs.mokoResources)
39+
api(libs.koin.core)
5240
}
5341
}
5442
}

ios-compose-kit/iosComposePod.podspec

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ Pod::Spec.new do |spec|
1111
spec.ios.deployment_target = '14.1'
1212
spec.dependency 'SQLCipher', '4.5.4'
1313

14+
if !Dir.exist?('build/cocoapods/framework/iosComposeKit.framework') || Dir.empty?('build/cocoapods/framework/iosComposeKit.framework')
15+
raise "
16+
17+
Kotlin framework 'iosComposeKit' doesn't exist yet, so a proper Xcode project can't be generated.
18+
'pod install' should be executed after running ':generateDummyFramework' Gradle task:
19+
20+
./gradlew :ios-compose-kit:generateDummyFramework
21+
22+
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
23+
end
24+
1425
spec.pod_target_xcconfig = {
1526
'KOTLIN_PROJECT_PATH' => ':ios-compose-kit',
1627
'PRODUCT_MODULE_NAME' => 'iosComposeKit',

iosApp/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shared-compose-ui/build.gradle.kts

Lines changed: 20 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,51 +14,32 @@ kotlin {
1414
kotlinOptions.jvmTarget = "11"
1515
}
1616
}
17-
android()
18-
iosX64()
17+
androidTarget()
1918
iosArm64()
2019
iosSimulatorArm64()
20+
applyDefaultHierarchyTemplate()
2121
sourceSets {
22-
val commonMain by getting {
23-
dependencies {
24-
implementation(project(":shared"))
25-
implementation(compose.ui)
26-
implementation(compose.runtime)
27-
implementation(compose.foundation)
28-
implementation(compose.material3)
29-
implementation(compose.materialIconsExtended)
30-
implementation(libs.decompose)
31-
implementation(libs.decompose.extComposeJb)
32-
implementation(libs.koin.core)
33-
api(libs.mokoResources.compose)
34-
}
22+
commonMain.dependencies {
23+
implementation(project(":shared"))
24+
implementation(compose.ui)
25+
implementation(compose.runtime)
26+
implementation(compose.foundation)
27+
implementation(compose.material3)
28+
implementation(compose.materialIconsExtended)
29+
implementation(libs.decompose)
30+
implementation(libs.decompose.extComposeJb)
31+
implementation(libs.koin.core)
32+
api(libs.mokoResources.compose)
3533
}
36-
val androidMain by getting {
37-
dependencies {
38-
implementation(libs.koin.androidx.compose)
39-
}
34+
androidMain.dependencies {
35+
implementation(libs.koin.androidx.compose)
4036
}
41-
val jvmMain by getting {
42-
dependencies {
43-
implementation(libs.koin.core.jvm)
44-
}
37+
jvmMain.dependencies {
38+
implementation(libs.koin.core.jvm)
4539
}
46-
val jvmTest by getting {
47-
dependencies {
48-
implementation(kotlin("test"))
49-
implementation(compose.desktop.uiTestJUnit4)
50-
}
51-
}
52-
val iosX64Main by getting
53-
val iosArm64Main by getting
54-
val iosSimulatorArm64Main by getting
55-
val iosMain by creating {
56-
dependsOn(commonMain)
57-
iosX64Main.dependsOn(this)
58-
iosArm64Main.dependsOn(this)
59-
iosSimulatorArm64Main.dependsOn(this)
60-
dependencies {
61-
}
40+
jvmTest.dependencies {
41+
implementation(kotlin("test"))
42+
implementation(compose.desktop.uiTestJUnit4)
6243
}
6344
all {
6445
languageSettings.optIn("kotlin.RequiresOptIn")

shared-compose-ui/src/commonMain/kotlin/com/softartdev/notedelight/ui/dialog/extDialogHolder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fun DialogHolder.showError(message: String?) = showDialog {
7171
fun ErrorDialog(message: String?, dismissDialog: () -> Unit) = ShowDialog(
7272
title = stringResource(MR.strings.error_title),
7373
text = message,
74-
onConfirm = dismissDialog,
74+
onConfirm = dismissDialog, //TODO show 1 button
7575
onDismiss = dismissDialog
7676
)
7777

0 commit comments

Comments
 (0)