Skip to content

Commit 953c3b4

Browse files
authored
Merge pull request #142 from powersync-ja/dependency-update
Update dependencies
2 parents 55ef17c + b9552d3 commit 953c3b4

File tree

14 files changed

+57
-58
lines changed

14 files changed

+57
-58
lines changed

PowerSyncKotlin/build.gradle.kts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import co.touchlab.faktory.artifactmanager.ArtifactManager
22
import co.touchlab.faktory.capitalized
33
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
4-
import org.jetbrains.kotlin.ir.backend.js.compile
5-
import java.net.URL
64
import java.security.MessageDigest
75

86
plugins {
@@ -170,7 +168,7 @@ abstract class UpdatePackageSwiftChecksumTask : DefaultTask() {
170168

171169
// Download the zip file
172170
zipFile.parentFile.mkdirs()
173-
URL(zipUrl.get()).openStream().use { input ->
171+
project.uri(zipUrl.get()).toURL().openStream().use { input ->
174172
zipFile.outputStream().use { output ->
175173
input.copyTo(output)
176174
}

build.gradle.kts

+1-13
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,7 @@ plugins {
1515
alias(libs.plugins.downloadPlugin) apply false
1616
alias(libs.plugins.kotlinter) apply false
1717
alias(libs.plugins.keeper) apply false
18-
}
19-
20-
// Having different versions of this lead to the issue mentioned here
21-
// https://stackoverflow.com/questions/76479563/could-not-found-kotlinx-atomicfu-compose-multiplatform-ios
22-
// This and the `apply(plugin = "kotlinx-atomicfu")` in allprojects below solve the issue but can be deleted in future when
23-
// the issue is resolved https://github.com/Kotlin/kotlinx-atomicfu/issues/469
24-
buildscript {
25-
dependencies {
26-
classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.23.1")
27-
}
18+
alias(libs.plugins.kotlin.atomicfu) apply false
2819
}
2920

3021
allprojects {
@@ -57,9 +48,6 @@ allprojects {
5748
// We have a transitive dependency on this due to Kermit, but need the fixed version to support Java 8
5849
resolutionStrategy.force("co.touchlab:stately-collections:${libs.versions.stately.get()}")
5950
}
60-
61-
//
62-
apply(plugin = "kotlinx-atomicfu")
6351
}
6452
subprojects {
6553
val GROUP: String by project

core/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ plugins {
1818
alias(libs.plugins.kotlinter)
1919
id("com.powersync.plugins.sonatype")
2020
alias(libs.plugins.mokkery)
21+
alias(libs.plugins.kotlin.atomicfu)
2122
}
2223

2324
val sqliteVersion = "3450200"

core/src/commonMain/kotlin/com/powersync/db/PowerSyncDatabaseImpl.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ import kotlinx.coroutines.flow.first
3434
import kotlinx.coroutines.launch
3535
import kotlinx.coroutines.runBlocking
3636
import kotlinx.datetime.Instant
37+
import kotlinx.datetime.LocalDateTime
3738
import kotlinx.datetime.TimeZone
3839
import kotlinx.datetime.toInstant
39-
import kotlinx.datetime.toLocalDateTime
4040
import kotlinx.serialization.encodeToString
4141

4242
/**
@@ -316,7 +316,7 @@ internal class PowerSyncDatabaseImpl(
316316

317317
SyncedAt(
318318
priority = BucketPriority(it.getLong(0)!!.toInt()),
319-
syncedAt = rawTime.replace(" ", "T").toLocalDateTime().toInstant(TimeZone.UTC),
319+
syncedAt = LocalDateTime.parse(rawTime.replace(" ", "T")).toInstant(TimeZone.UTC),
320320
)
321321
}
322322

core/src/commonMain/kotlin/com/powersync/sync/SyncStatus.kt

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import kotlinx.coroutines.flow.SharedFlow
77
import kotlinx.coroutines.flow.asSharedFlow
88
import kotlinx.datetime.Instant
99

10+
@ConsistentCopyVisibility
1011
public data class PriorityStatusEntry internal constructor(
1112
val priority: BucketPriority,
1213
val lastSyncedAt: Instant?,

demos/android-supabase-todolist/app/build.gradle.kts

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
alias(libs.plugins.android.application)
55
alias(libs.plugins.jetbrains.kotlin.android)
66
alias(libs.plugins.sqldelight)
7+
alias(libs.plugins.compose.compiler)
78
}
89

910
val localProperties = Properties()
@@ -18,7 +19,7 @@ fun getLocalProperty(key: String, defaultValue: String): String {
1819

1920
android {
2021
namespace = "com.powersync.androidexample"
21-
compileSdk = 34
22+
compileSdk = 35
2223

2324
buildFeatures {
2425
buildConfig = true
@@ -27,7 +28,7 @@ android {
2728
defaultConfig {
2829
applicationId = "com.powersync.androidexample"
2930
minSdk = 24
30-
targetSdk = 34
31+
targetSdk = 35
3132
versionCode = 1
3233
versionName = "1.0"
3334

demos/android-supabase-todolist/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
plugins {
33
alias(libs.plugins.android.application) apply false
44
alias(libs.plugins.jetbrains.kotlin.android) apply false
5+
alias(libs.plugins.compose.compiler) apply false
56
}

demos/android-supabase-todolist/gradle/libs.versions.toml

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[versions]
2-
agp = "8.5.1"
2+
agp = "8.9.0"
33
coreSplashscreen = "1.0.1"
4-
kotlin = "1.9.0"
5-
coreKtx = "1.13.1"
4+
kotlin = "2.1.10"
5+
coreKtx = "1.15.0"
66
junit = "4.13.2"
77
junitVersion = "1.2.1"
88
espressoCore = "3.6.1"
9-
lifecycleRuntimeKtx = "2.6.1"
10-
activityCompose = "1.9.2"
11-
composeBom = "2024.04.01"
12-
materialIconsExtended = "1.7.2"
9+
lifecycleRuntimeKtx = "2.8.7"
10+
activityCompose = "1.10.1"
11+
composeBom = "2025.02.00"
12+
materialIconsExtended = "1.7.8"
1313
uuid = "0.8.2"
14-
kermit = "2.0.4"
14+
kermit = "2.0.5"
1515
sqldelight= "2.0.2"
1616

1717
[libraries]
@@ -38,3 +38,4 @@ kermit = { module = "co.touchlab:kermit", version.ref = "kermit" }
3838
android-application = { id = "com.android.application", version.ref = "agp" }
3939
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
4040
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
41+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Thu Sep 19 13:08:23 SAST 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

demos/supabase-todolist/gradle/libs.versions.toml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[versions]
22
## SDK Versions
33
android-minSdk = "24"
4-
android-targetSdk = "34"
5-
android-compileSdk = "34"
4+
android-targetSdk = "35"
5+
android-compileSdk = "35"
66
java = "17"
77

88
# Dependencies
9-
kotlin = "2.0.20"
9+
kotlin = "2.1.10"
1010
coroutines = "1.8.1"
11-
kotlinx-datetime = "0.5.0"
11+
kotlinx-datetime = "0.6.2"
1212
kotlinx-io = "0.5.4"
1313
ktor = "3.0.1"
1414
uuid = "0.8.2"
@@ -17,15 +17,15 @@ buildKonfig = "0.15.1"
1717
junit = "4.13.2"
1818

1919
compose = "1.6.11"
20-
compose-preview = "1.7.2"
21-
lifecycle = "2.8.2"
20+
compose-preview = "1.7.8"
21+
lifecycle = "2.8.4"
2222

2323
# plugins
24-
android-gradle-plugin = "8.5.1"
24+
android-gradle-plugin = "8.9.0"
2525

2626
# Sample - Android
27-
androidx-core = "1.13.1"
28-
androidx-activity-compose = "1.9.2"
27+
androidx-core = "1.15.0"
28+
androidx-activity-compose = "1.10.1"
2929

3030
androidx-appcompat = "1.7.0"
3131
androidx-espresso-core = "3.6.1"

demos/supabase-todolist/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
package com.powersync.demos
22

3+
import androidx.compose.foundation.layout.WindowInsets
34
import androidx.compose.foundation.layout.fillMaxSize
5+
import androidx.compose.foundation.layout.systemBars
6+
import androidx.compose.foundation.layout.windowInsetsPadding
47
import androidx.compose.runtime.Composable
58
import androidx.compose.ui.Modifier
69
import com.powersync.DatabaseDriverFactory
710

811
@Composable
9-
fun MainView(factory: DatabaseDriverFactory) = App(factory, Modifier.fillMaxSize())
12+
fun MainView(factory: DatabaseDriverFactory) = App(
13+
factory,
14+
Modifier.fillMaxSize().windowInsetsPadding(WindowInsets.systemBars)
15+
)

gradle/libs.versions.toml

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[versions]
22
## SDK Versions
33
android-minSdk = "24"
4-
android-targetSdk = "34"
5-
android-compileSdk = "34"
6-
configurationAnnotations = "0.9.3"
4+
android-targetSdk = "35"
5+
android-compileSdk = "35"
6+
configurationAnnotations = "0.9.5"
77
java = "17"
8-
idea = "222.4459.24" # Flamingo | 2022.2.1 (see https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html)
8+
idea = "243.22562.218" # Meerkat | 2024.3.1 (see https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html)
99

1010
# Dependencies
1111
kermit = "2.0.5"
12-
kotlin = "2.0.20"
12+
kotlin = "2.1.10"
1313
coroutines = "1.8.1"
14-
kotlinx-datetime = "0.5.0"
14+
kotlinx-datetime = "0.6.2"
1515
kotlinx-io = "0.5.4"
1616
ktor = "3.0.1"
1717
uuid = "0.8.2"
@@ -26,23 +26,24 @@ supabase = "3.0.1"
2626
junit = "4.13.2"
2727

2828
compose = "1.6.11"
29-
compose-preview = "1.7.2"
29+
compose-preview = "1.7.8"
3030
androidxSqlite = "2.4.0"
3131

3232
# plugins
33-
android-gradle-plugin = "8.5.1"
33+
android-gradle-plugin = "8.9.0"
3434
kmmBridge = "0.5.7"
35-
skie = "0.9.5"
35+
skie = "0.10.1"
3636
maven-publish = "0.27.0"
3737
download-plugin = "5.5.0"
38-
grammerKit = "0.1.12"
39-
mokkery = "2.4.0"
40-
kotlinter = "4.4.1"
38+
grammarkit-composer = "0.1.12"
39+
mokkery = "2.7.1"
40+
kotlinter = "5.0.1"
4141
keeper = "0.16.1"
42+
atomicfu = "0.27.0"
4243

4344
# Sample - Android
44-
androidx-core = "1.13.1"
45-
androidx-activity-compose = "1.9.2"
45+
androidx-core = "1.15.0"
46+
androidx-activity-compose = "1.10.1"
4647

4748
androidx-appcompat = "1.7.0"
4849
androidx-espresso-core = "3.6.1"
@@ -119,13 +120,14 @@ kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", versio
119120
skie = { id = "co.touchlab.skie", version.ref = "skie" }
120121
kmmbridge = { id = "co.touchlab.kmmbridge", version.ref = "kmmBridge" }
121122
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqlDelight" }
122-
grammarKitComposer = { id = "com.alecstrong.grammar.kit.composer", version.ref = "grammerKit" }
123+
grammarKitComposer = { id = "com.alecstrong.grammar.kit.composer", version.ref = "grammarkit-composer" }
123124
mavenPublishPlugin = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish" }
124125
downloadPlugin = { id = "de.undercouch.download", version.ref = "download-plugin" }
125126
mokkery = { id = "dev.mokkery", version.ref = "mokkery" }
126127
kotlinter = { id = "org.jmailen.kotlinter", version.ref = "kotlinter" }
127128
keeper = { id = "com.slack.keeper", version.ref = "keeper" }
128129
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
130+
kotlin-atomicfu = { id = "org.jetbrains.kotlinx.atomicfu", version.ref = "atomicfu" }
129131

130132
[bundles]
131133
sqldelight = [

plugins/sonatype/src/main/kotlin/com/powersync/plugins/sonatype/SonatypeCentralExtension.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public abstract class SonatypeCentralExtension(
4141
val sonatypeCentralUploadDir =
4242
project.file(project.layout.buildDirectory.dir(REPO_DIR))
4343

44-
project.tasks.create(COMPONENT_BUNDLE_TASK_NAME, Zip::class.java) {
44+
val bundle = project.tasks.register(COMPONENT_BUNDLE_TASK_NAME, Zip::class.java) {
4545
it.group = GROUP
4646
it.description = "Creates a bundle for Sonatype Central Portal publishing."
4747
it.archiveClassifier.set("bundle")
@@ -55,10 +55,10 @@ public abstract class SonatypeCentralExtension(
5555
}
5656

5757
log.info("Setting up the `:${PUBLISH_TASK_NAME}` task")
58-
project.tasks.create(PUBLISH_TASK_NAME, PublishToCentralPortalTask::class.java) {
58+
project.tasks.register(PUBLISH_TASK_NAME, PublishToCentralPortalTask::class.java) {
5959
it.group = GROUP
6060
it.description = "Publishes the bundle to Sonatype Central Portal"
61-
it.dependsOn(project.tasks.named(COMPONENT_BUNDLE_TASK_NAME))
61+
it.dependsOn(bundle)
6262
}
6363
}
6464
}

0 commit comments

Comments
 (0)