Skip to content

Commit 1393822

Browse files
committed
Update example apps to 3.2 release
1 parent 6cf9bb1 commit 1393822

File tree

10 files changed

+52
-42
lines changed

10 files changed

+52
-42
lines changed

examples/getting-started-compose/composeApp/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ kotlin {
3838
implementation(compose.foundation)
3939
implementation(compose.material)
4040
implementation(compose.ui)
41+
implementation(libs.kotlinx.datetime)
4142
}
4243
androidMain.dependencies {
4344
implementation(libs.compose.ui.tooling.preview)
@@ -46,6 +47,10 @@ kotlin {
4647
jvmMain.dependencies {
4748
implementation(compose.desktop.currentOs)
4849
}
50+
51+
configureEach {
52+
languageSettings.optIn("kotlin.time.ExperimentalTime")
53+
}
4954
}
5055
}
5156

examples/getting-started-compose/composeApp/src/commonMain/kotlin/SharedDbWork.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,11 @@ class SharedDbWork {
9494
)
9595

9696
val repl = Replicator(
97-
ReplicatorConfigurationFactory.newConfig(
98-
target = URLEndpoint("ws://localhost:4984/getting-started-db"),
99-
collections = mapOf(setOf(coll) to collConfig),
100-
type = ReplicatorType.PUSH_AND_PULL,
101-
authenticator = BasicAuthenticator("sync-gateway", "password".toCharArray())
102-
)
97+
ReplicatorConfiguration(URLEndpoint("ws://localhost:4984/getting-started-db"))
98+
.addCollection(coll, collConfig).apply {
99+
type = ReplicatorType.PUSH_AND_PULL
100+
authenticator = BasicAuthenticator("sync-gateway", "password".toCharArray())
101+
}
103102
)
104103

105104
// Listen to replicator change events.
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[versions]
2-
activity-compose = "1.10.1"
3-
android-gradle-plugin = "8.11.1"
4-
compose = "1.9.0"
5-
compose-plugin = "1.8.2"
6-
couchbase-lite-objc = "3.1.10"
7-
kotbase = "3.1.11-1.1.2"
8-
kotlin = "2.2.10"
2+
activity-compose = "1.11.0"
3+
android-gradle-plugin = "8.12.3"
4+
compose = "1.9.4"
5+
compose-plugin = "1.9.1"
6+
couchbase-lite-objc = "3.2.4"
7+
kotbase = "3.2.4-1.2.0"
8+
kotlin = "2.2.21"
99

1010
[plugins]
1111
android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
@@ -18,3 +18,4 @@ androidx-activity-compose = { module = "androidx.activity:activity-compose", ver
1818
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
1919
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
2020
kotbase = { module = "dev.kotbase:couchbase-lite-ktx", version.ref = "kotbase" }
21+
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.7.1" }

examples/getting-started/gradle/libs.versions.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[versions]
2-
android-gradle-plugin = "8.11.1"
2+
android-gradle-plugin = "8.12.3"
33
androidx-appcompat = "1.7.1"
44
androidx-constraintlayout = "2.2.1"
55
androidx-core-ktx = "1.17.0"
6-
androidx-lifecycle-ktx = "2.9.3"
7-
androidx-material = "1.12.0"
8-
compose-plugin = "1.8.2"
9-
couchbase-lite-c = "3.1.10"
10-
kmp-native-coroutines = "1.0.0-ALPHA-46"
11-
kotbase = "3.1.11-1.1.2"
12-
kotlin = "2.2.10"
13-
ksp = "2.2.10-2.0.2"
6+
androidx-lifecycle-ktx = "2.9.4"
7+
androidx-material = "1.13.0"
8+
compose-plugin = "1.9.1"
9+
couchbase-lite-c = "3.2.4"
10+
kmp-native-coroutines = "1.0.0-ALPHA-48"
11+
kotbase = "3.2.4-1.2.0"
12+
kotlin = "2.2.21"
13+
ksp = "2.3.0"
1414

1515
[plugins]
1616
android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
@@ -30,3 +30,4 @@ androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx
3030
androidx-lifecycle-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle-ktx" }
3131
androidx-material = { module = "com.google.android.material:material", version.ref = "androidx-material" }
3232
kotbase = { module = "dev.kotbase:couchbase-lite-ktx", version.ref = "kotbase" }
33+
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.7.1" }

examples/getting-started/iosApp/iosApp.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@
420420
repositoryURL = "https://github.com/rickclephas/KMP-NativeCoroutines.git";
421421
requirement = {
422422
kind = exactVersion;
423-
version = "1.0.0-ALPHA-46-spm-async";
423+
version = "1.0.0-ALPHA-48-spm-async";
424424
};
425425
};
426426
/* End XCRemoteSwiftPackageReference section */

examples/getting-started/shared/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ kotlin {
3939
sourceSets {
4040
commonMain.dependencies {
4141
api(libs.kotbase)
42+
implementation(libs.kotlinx.datetime)
4243
}
4344
configureEach {
4445
languageSettings {
46+
optIn("kotlin.time.ExperimentalTime")
4547
if (!name.startsWith("common") &&
4648
!name.startsWith("jvm") &&
4749
!name.startsWith("android")

examples/getting-started/shared/src/commonMain/kotlin/SharedDbWork.kt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ class SharedDbWork {
6060
}
6161

6262
// Create a query to fetch documents with language == Kotlin.
63-
@OptIn(ExperimentalStdlibApi::class)
6463
fun queryDocs() {
6564
val coll = collection ?: return
6665

@@ -97,12 +96,11 @@ class SharedDbWork {
9796
)
9897

9998
val repl = Replicator(
100-
ReplicatorConfigurationFactory.newConfig(
101-
target = URLEndpoint("ws://localhost:4984/getting-started-db"),
102-
collections = mapOf(setOf(coll) to collConfig),
103-
type = ReplicatorType.PUSH_AND_PULL,
104-
authenticator = BasicAuthenticator("sync-gateway", "password".toCharArray())
105-
)
99+
ReplicatorConfiguration(URLEndpoint("ws://localhost:4984/getting-started-db"))
100+
.addCollection(coll, collConfig).apply {
101+
type = ReplicatorType.PUSH_AND_PULL
102+
authenticator = BasicAuthenticator("sync-gateway", "password".toCharArray())
103+
}
106104
)
107105

108106
// Listen to replicator change events.
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
[versions]
22
android-compileSdk = "36"
3-
android-minSdk = "24"
3+
android-minSdk = "26"
44
android-targetSdk = "36"
5-
compose = "1.9.0"
6-
compose-plugin = "1.8.2"
5+
compose = "1.9.4"
6+
compose-plugin = "1.9.1"
77
coroutines = "1.10.2"
8-
couchbase-lite-objc = "3.1.10"
9-
kotbase = "3.1.11-1.1.2"
10-
koin = "4.1.0"
11-
kotlin = "2.2.10"
12-
ktor = "3.2.3"
8+
couchbase-lite-objc = "3.2.4"
9+
kotbase = "3.2.4-1.2.0"
10+
koin = "4.1.1"
11+
kotlin = "2.2.21"
12+
ktor = "3.3.1"
1313

1414
[plugins]
15-
android-application = { id = "com.android.application", version = "8.11.1" }
15+
android-application = { id = "com.android.application", version = "8.12.3" }
1616
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
1717
jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
1818
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
1919
kotlin-native-cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
2020
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
2121

2222
[libraries]
23-
androidx-activity-compose = { module = "androidx.activity:activity-compose", version = "1.10.1" }
23+
androidx-activity-compose = { module = "androidx.activity:activity-compose", version = "1.11.0" }
2424
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
2525
koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
2626
koin-compose = { module = "io.insert-koin:koin-compose", version.ref = "koin" }
@@ -30,7 +30,7 @@ kotbase = { module = "dev.kotbase:couchbase-lite-ktx", version.ref = "kotbase" }
3030
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
3131
kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
3232
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.9.0" }
33-
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.6.2" }
33+
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.7.1" }
3434
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
3535
ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" }
3636
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }

examples/kotbase-notes/kotbase-notes/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ kotlin {
7878
implementation(compose.desktop.currentOs)
7979
implementation(libs.kotlinx.coroutines.swing)
8080
}
81+
82+
configureEach {
83+
languageSettings.optIn("kotlin.time.ExperimentalTime")
84+
}
8185
}
8286
}
8387

examples/kotbase-notes/kotbase-notes/src/jvmCommonMain/kotlin/domain/model/Note.jvmCommon.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package domain.model
22

33
import kotlin.time.Instant
4-
import kotlinx.datetime.toJavaInstant
54
import java.time.LocalDateTime
65
import java.time.Month
76
import java.time.YearMonth
87
import java.time.ZoneOffset
98
import java.time.format.DateTimeFormatter
109
import java.time.format.FormatStyle
10+
import kotlin.time.toJavaInstant
1111

1212
actual fun Instant.toLocalizedString(): String {
1313
val javaInstant = toJavaInstant()

0 commit comments

Comments
 (0)