diff --git a/build.gradle.kts b/build.gradle.kts
index 92d75028..cb631031 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -7,8 +7,8 @@ import java.nio.file.Files
plugins {
alias(libs.plugins.jetbrainsCompose) apply false
alias(libs.plugins.compose.compiler) apply false
- alias(libs.plugins.androidApplication) apply false
- alias(libs.plugins.androidLibrary) apply false
+ alias(libs.plugins.android.application) apply false
+ alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
alias(libs.plugins.skie) apply false
alias(libs.plugins.kotlin.jvm) apply false
@@ -20,6 +20,7 @@ plugins {
alias(libs.plugins.kotlinter) apply false
alias(libs.plugins.keeper) apply false
alias(libs.plugins.kotlin.atomicfu) apply false
+ alias(libs.plugins.cocoapods) apply false
id("org.jetbrains.dokka") version libs.versions.dokkaBase
id("dokka-convention")
}
diff --git a/compose/build.gradle.kts b/compose/build.gradle.kts
index aabc9354..29d2f75e 100644
--- a/compose/build.gradle.kts
+++ b/compose/build.gradle.kts
@@ -3,7 +3,7 @@ import com.powersync.plugins.utils.powersyncTargets
plugins {
alias(libs.plugins.kotlinMultiplatform)
- alias(libs.plugins.androidLibrary)
+ alias(libs.plugins.android.library)
alias(libs.plugins.jetbrainsCompose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.kotlinter)
@@ -12,7 +12,12 @@ plugins {
}
kotlin {
- powersyncTargets(includeTargetsWithoutComposeSupport = false)
+ powersyncTargets(
+ includeTargetsWithoutComposeSupport = false,
+ // Recent versions of Compose Multiplatform generate bytecode with Java 11, which we have
+ // to adopt as well
+ legacyJavaSupport = false,
+ )
explicitApi()
diff --git a/connectors/supabase/build.gradle.kts b/connectors/supabase/build.gradle.kts
index 485d3fd2..809e3848 100644
--- a/connectors/supabase/build.gradle.kts
+++ b/connectors/supabase/build.gradle.kts
@@ -5,7 +5,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinSerialization)
- alias(libs.plugins.androidLibrary)
+ alias(libs.plugins.android.library)
alias(libs.plugins.kotlinter)
id("com.powersync.plugins.sonatype")
id("dokka-convention")
diff --git a/core-tests-android/build.gradle.kts b/core-tests-android/build.gradle.kts
index 46c4fad2..d422b643 100644
--- a/core-tests-android/build.gradle.kts
+++ b/core-tests-android/build.gradle.kts
@@ -1,7 +1,7 @@
import com.slack.keeper.optInToKeeper
plugins {
- alias(libs.plugins.androidApplication)
+ alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.keeper)
}
diff --git a/core/build.gradle.kts b/core/build.gradle.kts
index 46fa7cac..b1a71240 100644
--- a/core/build.gradle.kts
+++ b/core/build.gradle.kts
@@ -14,7 +14,7 @@ import org.jetbrains.kotlin.konan.target.Family
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinSerialization)
- alias(libs.plugins.androidLibrary)
+ alias(libs.plugins.android.library)
alias(libs.plugins.mavenPublishPlugin)
alias(libs.plugins.downloadPlugin)
alias(libs.plugins.kotlinter)
diff --git a/demos/android-supabase-todolist/app/.gitignore b/demos/android-supabase-todolist/.gitignore
similarity index 100%
rename from demos/android-supabase-todolist/app/.gitignore
rename to demos/android-supabase-todolist/.gitignore
diff --git a/demos/android-supabase-todolist/README.md b/demos/android-supabase-todolist/README.md
index b040f161..72199dfd 100644
--- a/demos/android-supabase-todolist/README.md
+++ b/demos/android-supabase-todolist/README.md
@@ -37,9 +37,9 @@ all items have been received.
## Configure project in Android Studio
1. Clone this repo: ```git clone https://github.com/powersync-ja/powersync-kotlin.git```
-2. Open `powersync-kotlin/demos/android-supabase-todolist` in Android Studio.
+2. Open `powersync-kotlin/` in Android Studio.
3. Sync the project with Gradle (this should happen automatically, or choose File > Sync project with Gradle Files).
-4. Insert your Supabase project URL, Supabase Anon Key, and PowerSync instance URL into the `local.properties` file:
+4. Insert your Supabase project URL, Supabase Anon Key, and PowerSync instance URL into the `demos/android-supabase-todolist/local.properties` file:
```bash
# local.properties
@@ -86,4 +86,4 @@ dependencies {
implementation("com.powersync:connector-supabase:$powersyncVersion")
...
}
-```
\ No newline at end of file
+```
diff --git a/demos/android-supabase-todolist/app/build.gradle.kts b/demos/android-supabase-todolist/app/build.gradle.kts
deleted file mode 100644
index a8011368..00000000
--- a/demos/android-supabase-todolist/app/build.gradle.kts
+++ /dev/null
@@ -1,110 +0,0 @@
-import java.util.Properties
-
-plugins {
- alias(libs.plugins.android.application)
- alias(libs.plugins.jetbrains.kotlin.android)
- alias(libs.plugins.sqldelight)
- alias(libs.plugins.compose.compiler)
-}
-
-val localProperties = Properties()
-val localPropertiesFile = rootProject.file("local.properties")
-if (localPropertiesFile.exists()) {
- localPropertiesFile.inputStream().use { localProperties.load(it) }
-}
-
-fun getLocalProperty(
- key: String,
- defaultValue: String,
-): String = localProperties.getProperty(key, defaultValue)
-
-android {
- namespace = "com.powersync.androidexample"
- compileSdk = 35
-
- buildFeatures {
- buildConfig = true
- }
-
- defaultConfig {
- applicationId = "com.powersync.androidexample"
- minSdk = 24
- targetSdk = 35
- versionCode = 1
- versionName = "1.0"
-
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
- vectorDrawables {
- useSupportLibrary = true
- }
-
- buildConfigField("String", "SUPABASE_URL", "\"${getLocalProperty("SUPABASE_URL", "")}\"")
- buildConfigField(
- "String",
- "SUPABASE_ANON_KEY",
- "\"${getLocalProperty("SUPABASE_ANON_KEY", "")}\"",
- )
- buildConfigField(
- "String",
- "SUPABASE_STORAGE_BUCKET",
- "\"${getLocalProperty("SUPABASE_STORAGE_BUCKET", "null")}\"",
- )
- buildConfigField("String", "POWERSYNC_URL", "\"${getLocalProperty("POWERSYNC_URL", "")}\"")
- }
-
- buildTypes {
- release {
- isMinifyEnabled = false
- proguardFiles(
- getDefaultProguardFile("proguard-android-optimize.txt"),
- "proguard-rules.pro",
- )
- }
- }
- compileOptions {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = "1.8"
- }
- buildFeatures {
- compose = true
- }
- composeOptions {
- kotlinCompilerExtensionVersion = "1.5.1"
- }
- packaging {
- resources {
- excludes += "/META-INF/{AL2.0,LGPL2.1}"
- }
- }
-}
-
-dependencies {
- implementation(libs.androidx.core.splashscreen)
- implementation(libs.androidx.core.ktx)
- implementation(libs.androidx.lifecycle.runtime.ktx)
- implementation(libs.androidx.activity.compose)
- implementation(platform(libs.androidx.compose.bom))
- implementation(libs.androidx.ui)
- implementation(libs.androidx.ui.graphics)
- implementation(libs.androidx.ui.tooling.preview)
- implementation(libs.androidx.material3)
- testImplementation(libs.junit)
- androidTestImplementation(libs.androidx.junit)
- androidTestImplementation(libs.androidx.espresso.core)
- androidTestImplementation(platform(libs.androidx.compose.bom))
- androidTestImplementation(libs.androidx.ui.test.junit4)
- debugImplementation(libs.androidx.ui.tooling)
- debugImplementation(libs.androidx.ui.test.manifest)
- // To use a fixed version, replace "latest.release" with the latest version available at
- // https://central.sonatype.com/artifact/com.powersync/core
- implementation("com.powersync:core:latest.release")
- implementation("com.powersync:connector-supabase:latest.release")
- implementation("com.powersync:compose:latest.release")
- implementation(libs.uuid)
- implementation(libs.kermit)
- implementation(libs.androidx.material.icons.extended)
- implementation("androidx.activity:activity-ktx:1.9.0")
-}
diff --git a/demos/android-supabase-todolist/build.gradle.kts b/demos/android-supabase-todolist/build.gradle.kts
index f41eb6bc..a94a9b38 100644
--- a/demos/android-supabase-todolist/build.gradle.kts
+++ b/demos/android-supabase-todolist/build.gradle.kts
@@ -1,6 +1,137 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
+import org.jetbrains.kotlin.gradle.dsl.JvmTarget
+import java.util.Properties
+
plugins {
- alias(libs.plugins.android.application) apply false
- alias(libs.plugins.jetbrains.kotlin.android) apply false
- alias(libs.plugins.compose.compiler) apply false
-}
\ No newline at end of file
+ alias(libs.plugins.android.application)
+ alias(libs.plugins.kotlin.android)
+ alias(libs.plugins.sqldelight)
+ alias(libs.plugins.compose.compiler)
+}
+
+val localProperties = Properties()
+val localPropertiesFile = project.file("local.properties")
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.inputStream().use { localProperties.load(it) }
+}
+
+fun getLocalProperty(
+ key: String,
+ defaultValue: String,
+): String = localProperties.getProperty(key, defaultValue)
+
+android {
+ namespace = "com.powersync.androidexample"
+ compileSdk = 35
+
+ buildFeatures {
+ buildConfig = true
+ }
+
+ defaultConfig {
+ applicationId = "com.powersync.androidexample"
+ minSdk = 24
+ targetSdk = 35
+ versionCode = 1
+ versionName = "1.0"
+
+ testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
+ vectorDrawables {
+ useSupportLibrary = true
+ }
+
+ buildConfigField("String", "SUPABASE_URL", "\"${getLocalProperty("SUPABASE_URL", "")}\"")
+ buildConfigField(
+ "String",
+ "SUPABASE_ANON_KEY",
+ "\"${getLocalProperty("SUPABASE_ANON_KEY", "")}\"",
+ )
+ buildConfigField(
+ "String",
+ "SUPABASE_STORAGE_BUCKET",
+ "\"${getLocalProperty("SUPABASE_STORAGE_BUCKET", "null")}\"",
+ )
+ buildConfigField("String", "POWERSYNC_URL", "\"${getLocalProperty("POWERSYNC_URL", "")}\"")
+ }
+
+ buildTypes {
+ release {
+ isMinifyEnabled = false
+ proguardFiles(
+ getDefaultProguardFile("proguard-android-optimize.txt"),
+ "proguard-rules.pro",
+ )
+ }
+ }
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+ }
+ buildFeatures {
+ compose = true
+ }
+ composeOptions {
+ kotlinCompilerExtensionVersion = "1.5.1"
+ }
+ packaging {
+ resources {
+ excludes += "/META-INF/{AL2.0,LGPL2.1}"
+ }
+ }
+}
+
+kotlin {
+ compilerOptions {
+ jvmTarget.set(JvmTarget.JVM_1_8)
+ }
+}
+
+val useReleasedVersions = getLocalProperty("USE_RELEASED_POWERSYNC_VERSIONS", "false") == "true"
+if (useReleasedVersions) {
+ configurations.all {
+ // https://docs.gradle.org/current/userguide/resolution_rules.html#sec:conditional-dependency-substitution
+ resolutionStrategy.dependencySubstitution.all {
+ requested.let {
+ if (it is ProjectComponentSelector) {
+ val projectPath = it.projectPath
+ // Translate a dependency of e.g. :core into com.powersync:core:latest.release,
+ // taking into account that the Supabase connector uses a custom name.
+ val moduleName = when (projectPath) {
+ ":connectors:supabase" -> "connector-supabase"
+ else -> it.projectPath.substring(1).replace(':', '-')
+ }
+
+ useTarget("com.powersync:${moduleName}:latest.release")
+ }
+ }
+ }
+ }
+}
+
+dependencies {
+ implementation(libs.androidx.core.splashscreen)
+ implementation(libs.androidx.core)
+ implementation(libs.androidx.lifecycle.runtime.ktx)
+ implementation(libs.androidx.activity.compose)
+ implementation(platform(libs.androidx.compose.bom))
+ implementation(libs.androidx.ui)
+ implementation(libs.androidx.ui.graphics)
+ implementation(libs.androidx.ui.tooling.preview)
+ implementation(libs.androidx.material3)
+ implementation(libs.supabase.client)
+ testImplementation(libs.test.junit)
+ androidTestImplementation(libs.androidx.junit)
+ androidTestImplementation(libs.androidx.espresso.core)
+ androidTestImplementation(platform(libs.androidx.compose.bom))
+ androidTestImplementation(libs.androidx.ui.test.junit4)
+ debugImplementation(libs.androidx.ui.tooling)
+ debugImplementation(libs.androidx.ui.test.manifest)
+ // When adopting the PowerSync dependencies into your project, use the latest version available at
+ // https://central.sonatype.com/artifact/com.powersync/core
+ implementation(projects.core) // "com.powersync:core:latest.release"
+ implementation(projects.connectors.supabase) // "com.powersync:connector-supabase:latest.release"
+ implementation(projects.compose) // "com.powersync:compose:latest.release"
+ implementation(libs.uuid)
+ implementation(libs.kermit)
+ implementation(libs.androidx.material.icons.extended)
+ implementation(libs.androidx.activity.ktx)
+}
diff --git a/demos/android-supabase-todolist/gradle.properties b/demos/android-supabase-todolist/gradle.properties
deleted file mode 100644
index 20e2a015..00000000
--- a/demos/android-supabase-todolist/gradle.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. For more details, visit
-# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
-# org.gradle.parallel=true
-# AndroidX package structure to make it clearer which packages are bundled with the
-# Android operating system, and which are packaged with your app's APK
-# https://developer.android.com/topic/libraries/support-library/androidx-rn
-android.useAndroidX=true
-# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
-# Enables namespacing of each library's R class so that its R class includes only the
-# resources declared in the library itself and none from the library's dependencies,
-# thereby reducing the size of the R class for that library
-android.nonTransitiveRClass=true
\ No newline at end of file
diff --git a/demos/android-supabase-todolist/gradle/libs.versions.toml b/demos/android-supabase-todolist/gradle/libs.versions.toml
deleted file mode 100644
index ee232c4c..00000000
--- a/demos/android-supabase-todolist/gradle/libs.versions.toml
+++ /dev/null
@@ -1,41 +0,0 @@
-[versions]
-agp = "8.11.1"
-coreSplashscreen = "1.0.1"
-kotlin = "2.2.0"
-coreKtx = "1.16.0"
-junit = "4.13.2"
-junitVersion = "1.3.0"
-espressoCore = "3.7.0"
-lifecycleRuntimeKtx = "2.9.2"
-activityCompose = "1.10.1"
-composeBom = "2025.07.00"
-materialIconsExtended = "1.7.8"
-uuid = "0.8.4"
-kermit = "2.0.6"
-sqldelight = "2.1.0"
-
-[libraries]
-androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
-androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
-androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "materialIconsExtended" }
-junit = { group = "junit", name = "junit", version.ref = "junit" }
-androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
-androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
-androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
-androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
-androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
-androidx-ui = { group = "androidx.compose.ui", name = "ui" }
-androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
-androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
-androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
-androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
-androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
-androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
-uuid = { module = "com.benasher44:uuid", version.ref = "uuid" }
-kermit = { module = "co.touchlab:kermit", version.ref = "kermit" }
-
-[plugins]
-android-application = { id = "com.android.application", version.ref = "agp" }
-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
-sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
diff --git a/demos/android-supabase-todolist/gradle/wrapper/gradle-wrapper.jar b/demos/android-supabase-todolist/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index e708b1c0..00000000
Binary files a/demos/android-supabase-todolist/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/demos/android-supabase-todolist/gradle/wrapper/gradle-wrapper.properties b/demos/android-supabase-todolist/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 9aa196cd..00000000
--- a/demos/android-supabase-todolist/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Thu Sep 19 13:08:23 SAST 2024
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/demos/android-supabase-todolist/gradlew b/demos/android-supabase-todolist/gradlew
deleted file mode 100755
index 4f906e0c..00000000
--- a/demos/android-supabase-todolist/gradlew
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env sh
-
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-exec "$JAVACMD" "$@"
diff --git a/demos/android-supabase-todolist/gradlew.bat b/demos/android-supabase-todolist/gradlew.bat
deleted file mode 100644
index ac1b06f9..00000000
--- a/demos/android-supabase-todolist/gradlew.bat
+++ /dev/null
@@ -1,89 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/demos/android-supabase-todolist/app/proguard-rules.pro b/demos/android-supabase-todolist/proguard-rules.pro
similarity index 100%
rename from demos/android-supabase-todolist/app/proguard-rules.pro
rename to demos/android-supabase-todolist/proguard-rules.pro
diff --git a/demos/android-supabase-todolist/settings.gradle.kts b/demos/android-supabase-todolist/settings.gradle.kts
deleted file mode 100644
index 015b43da..00000000
--- a/demos/android-supabase-todolist/settings.gradle.kts
+++ /dev/null
@@ -1,51 +0,0 @@
-import java.util.Properties
-
-pluginManagement {
- repositories {
- google {
- content {
- includeGroupByRegex("com\\.android.*")
- includeGroupByRegex("com\\.google.*")
- includeGroupByRegex("androidx.*")
- }
- }
- mavenCentral()
- gradlePluginPortal()
- }
-}
-dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
-}
-
-rootProject.name = "PowersyncAndroidExample"
-include(":app")
-
-val localProperties =
- Properties().apply {
- try {
- load(file("local.properties").reader())
- } catch (ignored: java.io.IOException) {
- // ignore
- }
- }
-val useReleasedVersions = localProperties.getProperty("USE_RELEASED_POWERSYNC_VERSIONS") == "true"
-
-if (!useReleasedVersions) {
- includeBuild("../..") {
- dependencySubstitution {
- substitute(module("com.powersync:core"))
- .using(project(":core"))
- .because("we want to auto-wire up sample dependency")
- substitute(module("com.powersync:connector-supabase"))
- .using(project(":connectors:supabase"))
- .because("we want to auto-wire up sample dependency")
- substitute(module("com.powersync:compose"))
- .using(project(":compose"))
- .because("we want to auto-wire up sample dependency")
- }
- }
-}
diff --git a/demos/android-supabase-todolist/app/src/androidTest/java/com/example/androidexample/ExampleInstrumentedTest.kt b/demos/android-supabase-todolist/src/androidTest/java/com/example/androidexample/ExampleInstrumentedTest.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/androidTest/java/com/example/androidexample/ExampleInstrumentedTest.kt
rename to demos/android-supabase-todolist/src/androidTest/java/com/example/androidexample/ExampleInstrumentedTest.kt
diff --git a/demos/android-supabase-todolist/app/src/main/AndroidManifest.xml b/demos/android-supabase-todolist/src/main/AndroidManifest.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/AndroidManifest.xml
rename to demos/android-supabase-todolist/src/main/AndroidManifest.xml
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/App.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/App.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/App.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/App.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/Auth.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/Auth.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/Auth.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/Auth.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/MainActivity.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/MainActivity.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/MainActivity.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/MainActivity.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/NavController.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/NavController.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/NavController.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/NavController.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/Utils.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/Utils.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/Utils.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/Utils.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/EditDialog.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/EditDialog.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/EditDialog.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/EditDialog.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/Input.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/Input.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/Input.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/Input.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/List.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/List.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/List.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/List.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/ListItem.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/ListItem.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/ListItem.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/ListItem.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/Menu.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/Menu.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/Menu.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/Menu.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/TodoItem.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/TodoItem.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/TodoItem.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/TodoItem.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/TodoList.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/TodoList.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/TodoList.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/TodoList.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/WifiIcon.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/WifiIcon.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/components/WifiIcon.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/components/WifiIcon.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/powersync/List.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/powersync/List.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/powersync/List.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/powersync/List.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/powersync/Schema.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/powersync/Schema.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/powersync/Schema.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/powersync/Schema.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/powersync/Todo.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/powersync/Todo.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/powersync/Todo.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/powersync/Todo.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/screens/HomeScreen.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/screens/HomeScreen.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/screens/HomeScreen.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/screens/HomeScreen.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/screens/SignInScreen.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/screens/SignInScreen.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/screens/SignInScreen.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/screens/SignInScreen.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/screens/SignUpScreen.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/screens/SignUpScreen.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/screens/SignUpScreen.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/screens/SignUpScreen.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/screens/TodosScreen.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/screens/TodosScreen.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/screens/TodosScreen.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/screens/TodosScreen.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/ui/CameraService.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/ui/CameraService.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/ui/CameraService.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/ui/CameraService.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/ui/theme/Color.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/ui/theme/Color.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/ui/theme/Color.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/ui/theme/Color.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/ui/theme/Theme.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/ui/theme/Theme.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/ui/theme/Theme.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/ui/theme/Theme.kt
diff --git a/demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/ui/theme/Type.kt b/demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/ui/theme/Type.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/ui/theme/Type.kt
rename to demos/android-supabase-todolist/src/main/java/com/powersync/androidexample/ui/theme/Type.kt
diff --git a/demos/android-supabase-todolist/app/src/main/res/drawable-hdpi/splashscreen_image.png b/demos/android-supabase-todolist/src/main/res/drawable-hdpi/splashscreen_image.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/drawable-hdpi/splashscreen_image.png
rename to demos/android-supabase-todolist/src/main/res/drawable-hdpi/splashscreen_image.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/drawable-mdpi/splashscreen_image.png b/demos/android-supabase-todolist/src/main/res/drawable-mdpi/splashscreen_image.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/drawable-mdpi/splashscreen_image.png
rename to demos/android-supabase-todolist/src/main/res/drawable-mdpi/splashscreen_image.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/drawable-xhdpi/splashscreen_image.png b/demos/android-supabase-todolist/src/main/res/drawable-xhdpi/splashscreen_image.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/drawable-xhdpi/splashscreen_image.png
rename to demos/android-supabase-todolist/src/main/res/drawable-xhdpi/splashscreen_image.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/drawable-xxhdpi/splashscreen_image.png b/demos/android-supabase-todolist/src/main/res/drawable-xxhdpi/splashscreen_image.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/drawable-xxhdpi/splashscreen_image.png
rename to demos/android-supabase-todolist/src/main/res/drawable-xxhdpi/splashscreen_image.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/drawable-xxxhdpi/splashscreen_image.png b/demos/android-supabase-todolist/src/main/res/drawable-xxxhdpi/splashscreen_image.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/drawable-xxxhdpi/splashscreen_image.png
rename to demos/android-supabase-todolist/src/main/res/drawable-xxxhdpi/splashscreen_image.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/drawable/splashscreen.xml b/demos/android-supabase-todolist/src/main/res/drawable/splashscreen.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/drawable/splashscreen.xml
rename to demos/android-supabase-todolist/src/main/res/drawable/splashscreen.xml
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/demos/android-supabase-todolist/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to demos/android-supabase-todolist/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/demos/android-supabase-todolist/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to demos/android-supabase-todolist/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-hdpi/ic_launcher.png b/demos/android-supabase-todolist/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/demos/android-supabase-todolist/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/demos/android-supabase-todolist/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-mdpi/ic_launcher.png b/demos/android-supabase-todolist/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/demos/android-supabase-todolist/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/demos/android-supabase-todolist/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/demos/android-supabase-todolist/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/demos/android-supabase-todolist/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/demos/android-supabase-todolist/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/demos/android-supabase-todolist/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/demos/android-supabase-todolist/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/demos/android-supabase-todolist/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/demos/android-supabase-todolist/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/demos/android-supabase-todolist/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/demos/android-supabase-todolist/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to demos/android-supabase-todolist/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/demos/android-supabase-todolist/app/src/main/res/values/colors.xml b/demos/android-supabase-todolist/src/main/res/values/colors.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/values/colors.xml
rename to demos/android-supabase-todolist/src/main/res/values/colors.xml
diff --git a/demos/android-supabase-todolist/app/src/main/res/values/dimens.xml b/demos/android-supabase-todolist/src/main/res/values/dimens.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/values/dimens.xml
rename to demos/android-supabase-todolist/src/main/res/values/dimens.xml
diff --git a/demos/android-supabase-todolist/app/src/main/res/values/strings.xml b/demos/android-supabase-todolist/src/main/res/values/strings.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/values/strings.xml
rename to demos/android-supabase-todolist/src/main/res/values/strings.xml
diff --git a/demos/android-supabase-todolist/app/src/main/res/values/styles.xml b/demos/android-supabase-todolist/src/main/res/values/styles.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/values/styles.xml
rename to demos/android-supabase-todolist/src/main/res/values/styles.xml
diff --git a/demos/android-supabase-todolist/app/src/main/res/values/themes.xml b/demos/android-supabase-todolist/src/main/res/values/themes.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/values/themes.xml
rename to demos/android-supabase-todolist/src/main/res/values/themes.xml
diff --git a/demos/android-supabase-todolist/app/src/main/res/xml/backup_rules.xml b/demos/android-supabase-todolist/src/main/res/xml/backup_rules.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/xml/backup_rules.xml
rename to demos/android-supabase-todolist/src/main/res/xml/backup_rules.xml
diff --git a/demos/android-supabase-todolist/app/src/main/res/xml/data_extraction_rules.xml b/demos/android-supabase-todolist/src/main/res/xml/data_extraction_rules.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/xml/data_extraction_rules.xml
rename to demos/android-supabase-todolist/src/main/res/xml/data_extraction_rules.xml
diff --git a/demos/android-supabase-todolist/app/src/main/res/xml/filepaths.xml b/demos/android-supabase-todolist/src/main/res/xml/filepaths.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/xml/filepaths.xml
rename to demos/android-supabase-todolist/src/main/res/xml/filepaths.xml
diff --git a/demos/android-supabase-todolist/app/src/main/res/xml/network_security_config.xml b/demos/android-supabase-todolist/src/main/res/xml/network_security_config.xml
similarity index 100%
rename from demos/android-supabase-todolist/app/src/main/res/xml/network_security_config.xml
rename to demos/android-supabase-todolist/src/main/res/xml/network_security_config.xml
diff --git a/demos/android-supabase-todolist/app/src/test/java/com/example/androidexample/ExampleUnitTest.kt b/demos/android-supabase-todolist/src/test/java/com/example/androidexample/ExampleUnitTest.kt
similarity index 100%
rename from demos/android-supabase-todolist/app/src/test/java/com/example/androidexample/ExampleUnitTest.kt
rename to demos/android-supabase-todolist/src/test/java/com/example/androidexample/ExampleUnitTest.kt
diff --git a/demos/hello-powersync/.gitignore b/demos/hello-powersync/.gitignore
deleted file mode 100644
index 10539847..00000000
--- a/demos/hello-powersync/.gitignore
+++ /dev/null
@@ -1,18 +0,0 @@
-*.iml
-.gradle
-**/build/
-xcuserdata
-!src/**/build/
-local.properties
-.idea
-.DS_Store
-captures
-.externalNativeBuild
-.cxx
-*.xcodeproj/*
-!*.xcodeproj/project.pbxproj
-!*.xcodeproj/xcshareddata/
-!*.xcodeproj/project.xcworkspace/
-!*.xcworkspace/contents.xcworkspacedata
-**/xcshareddata/WorkspaceSettings.xcsettings
-**/powersync.db
diff --git a/demos/hello-powersync/README.md b/demos/hello-powersync/README.md
deleted file mode 100644
index eae038f3..00000000
--- a/demos/hello-powersync/README.md
+++ /dev/null
@@ -1,109 +0,0 @@
-# Hello-PowerSync Demo App
-
-This is a minimal demo app demonstrating use of the PowerSync Kotlin Mutiplatform SDK together
-with [Supabase](https://supabase.com/) in a basic Kotlin Multiplatform Compose App.
-
-The app lists customers and allows you to add or delete rows.
-Data is [synced to users globally](https://docs.powersync.com/usage/sync-rules/example-global-data). For more advanced sync rules and functionality, see the [PowerSync+Supabase Todo-List](../supabase-todolist/README.md) demo application.
-
-Supported targets: Android and iOS, and Desktop (JVM).
-
-## Beta release
-
-The Kotlin Multiplatform SDK is currently in a beta release. If you find a bug or issue, please
-open a [GitHub issue](https://github.com/powersync-ja/powersync-kotlin/issues). Questions or
-feedback can be posted on our [community Discord](https://discord.gg/powersync) - we'd love to hear
-from you.
-
-## Set up Supabase project and auth user
-1. Create a new Supabase project, and run the below in the Supabase SQL editor. This creates a `customers` table and a publication called `powersync` for the `customers` table.
-
-```sql
--- Create tables
-create table
- public.customers (
- id uuid not null default gen_random_uuid (),
- name text not null,
- email text not null,
- constraint customers_pkey primary key (id)
- ) tablespace pg_default;
-
-
-drop publication powersync;
-
--- Create publication for powersync
-create publication powersync for table customers;
-
-```
-
-2. Create a user which this demo app will use for authentication. This is done under *Authentication* > *Users* > *Add user*. Enter an email address and password for the user.
-
-## Set up PowerSync instance
-1. In your [PowerSync dashboard](https://powersync.journeyapps.com/), create a new PowerSync instance, connecting to the database of the Supabase project. Find detailed instructions in the [Connect PowerSync to Your Supabase](https://docs.powersync.com/integration-guides/supabase-+-powersync#connect-powersync-to-your-supabase) section of the Supabase<>PowerSync integration guide.
-
-2. Then deploy the sync rules to the newly created instance.
- - Open the `sync-rules.yaml` file.
- - Replace the file's contents with the below:
-
- ```yml
- # sync-rules.yaml
-
- bucket_definitions:
- global:
- data:
- # Sync all rows
- - SELECT * FROM public.customers
- ```
- - Deploy to the newly created instance.
-
-## Set up your development environment
-* To setup your environment, please consult [these instructions](https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-setup.html).
-* JDK version 17 is required.
-* Android Gradle plugin version 8.2.2 is required.
-
-## Configure project in Android Studio
-
-1. Clone this repo: ```git clone https://github.com/powersync-ja/powersync-kotlin.git```
-2. Open the repo in Android Studio. This creates a `local.properties` file in root and should contain a `sdk.dir=/path/to/android/sdk` line.
-3. Sync the project with Gradle (this should happen automatically, or choose File > Sync project with Gradle Files).
-4. Open the `demos/hello-powersync` directory in Android Studio and sync this project with Gradle.
-5. Insert your Supabase project URL, Supabase Anon Key, and PowerSync instance URL into the `local.properties` file:
-
-```
-# local.properties
-sdk.dir=/path/to/android/sdk
-
-# Enter your PowerSync instance URL
-POWERSYNC_URL=https://foo.powersync.journeyapps.com
-# Enter your Supabase project's URL and public anon key (Project settings > API)
-SUPABASE_URL=https://foo.supabase.co
-SUPABASE_ANON_KEY=foo
-
-# Enter your Supabase auth user's details
-SUPABASE_USER_EMAIL=user@example.com
-SUPABASE_USER_PASSWORD=foo
-```
-
-## Run the App
-
-- To run the Android app, run the `composeApp` Android Studio target configuration.
-- To run the iOS app, run the `iosApp` Android Studio target configuration.
-
-
-
-- To run the desktop app, run the `run` Gradle task (in the "compose desktop" group) or execute `./gradlew run`.
-
-
-## Project structure
-
-[//]: # (TODO)
-
-* `/composeApp` is for code that will be shared across your Compose Multiplatform applications.
- It contains several subfolders:
- - `commonMain` is for code that’s common for all targets.
- - Other folders are for Kotlin code that will be compiled for only the platform indicated in the
- folder name.
-
-* `/iosApp` contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform,
- you need this entry point for your iOS app. This is also where you should add SwiftUI code for
- your project.
diff --git a/demos/hello-powersync/build.gradle.kts b/demos/hello-powersync/build.gradle.kts
deleted file mode 100644
index 4e963e4f..00000000
--- a/demos/hello-powersync/build.gradle.kts
+++ /dev/null
@@ -1,9 +0,0 @@
-plugins {
- alias(projectLibs.plugins.androidApplication) apply false
- alias(projectLibs.plugins.androidLibrary) apply false
- alias(projectLibs.plugins.jetbrainsCompose) apply false
- alias(projectLibs.plugins.compose.compiler) apply false
- alias(projectLibs.plugins.kotlinMultiplatform) apply false
- alias(projectLibs.plugins.cocoapods) apply false
- alias(libs.plugins.buildKonfig) apply false
-}
diff --git a/demos/hello-powersync/composeApp/build.gradle.kts b/demos/hello-powersync/composeApp/build.gradle.kts
deleted file mode 100644
index b358eae5..00000000
--- a/demos/hello-powersync/composeApp/build.gradle.kts
+++ /dev/null
@@ -1,148 +0,0 @@
-import com.codingfeline.buildkonfig.compiler.FieldSpec.Type.STRING
-import org.jetbrains.compose.ExperimentalComposeLibrary
-import java.util.Properties
-
-plugins {
- alias(projectLibs.plugins.kotlinMultiplatform)
- alias(projectLibs.plugins.cocoapods)
- alias(projectLibs.plugins.androidApplication)
- alias(projectLibs.plugins.jetbrainsCompose)
- alias(projectLibs.plugins.compose.compiler)
- alias(projectLibs.plugins.skie)
- alias(libs.plugins.buildKonfig)
-}
-
-kotlin {
- androidTarget()
-
- jvm()
-
-// iosX64() // uncomment to enable iOS x64
- iosArm64()
- iosSimulatorArm64()
- cocoapods {
- version = "1.0.0"
- summary = "A shared library for Hello PowerSync app"
- homepage = "none"
- ios.deploymentTarget = "15.2"
- podfile = project.file("../iosApp/Podfile")
-
- pod("powersync-sqlite-core") {
- linkOnly = true
- version = "0.4.0"
- }
-
- framework {
- baseName = "composeApp"
- isStatic = true
- export("com.powersync:core")
- }
- }
-
- sourceSets {
- commonMain.dependencies {
- api("com.powersync:core")
- implementation("com.powersync:connector-supabase")
- implementation("com.powersync:compose")
- implementation(projectLibs.bundles.sqldelight)
- implementation(projectLibs.kotlinx.datetime)
- implementation(compose.runtime)
- implementation(compose.foundation)
- implementation(compose.material)
- implementation(compose.ui)
- @OptIn(ExperimentalComposeLibrary::class)
- implementation(compose.components.resources)
- }
-
- androidMain.dependencies {
- implementation(projectLibs.compose.ui.tooling.preview)
- implementation(projectLibs.androidx.activity.compose)
- }
-
- jvmMain.dependencies {
- implementation(compose.desktop.currentOs)
- }
- }
-}
-
-android {
- namespace = "com.powersync.demos"
- compileSdk =
- projectLibs.versions.android.compileSdk
- .get()
- .toInt()
-
- sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
- sourceSets["main"].res.srcDirs("src/androidMain/res")
- sourceSets["main"].resources.srcDirs("src/commonMain/resources")
-
- defaultConfig {
- applicationId = "com.powersync.demos"
- minSdk =
- projectLibs.versions.android.minSdk
- .get()
- .toInt()
- targetSdk =
- projectLibs.versions.android.targetSdk
- .get()
- .toInt()
- versionCode = 1
- versionName = "1.0"
- }
- buildFeatures {
- compose = true
- }
- packaging {
- resources {
- excludes += "/META-INF/{AL2.0,LGPL2.1}"
- }
- }
- buildTypes {
- getByName("release") {
- isMinifyEnabled = false
- }
- }
- compileOptions {
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
- }
-
- kotlin {
- jvmToolchain(17)
- }
-}
-
-val localProperties =
- Properties().apply {
- try {
- load(rootProject.file("local.properties").reader())
- } catch (ignored: java.io.IOException) {
- throw Error("local.properties file not found")
- }
- }
-
-buildkonfig {
- packageName = "com.powersync.demos"
- objectName = "Config"
-
- defaultConfigs {
- fun stringConfigField(name: String) {
- val propValue = localProperties.getProperty(name, "")
- if (propValue.isBlank()) {
- println("Warning: Property $name not found in local.properties")
- } else {
- buildConfigField(STRING, name, propValue)
- }
- }
-
- stringConfigField("POWERSYNC_URL")
- stringConfigField("SUPABASE_URL")
- stringConfigField("SUPABASE_ANON_KEY")
- stringConfigField("SUPABASE_USER_EMAIL")
- stringConfigField("SUPABASE_USER_PASSWORD")
- }
-}
-
-compose.desktop.application {
- mainClass = "com.powersync.demos.MainKt"
-}
diff --git a/demos/hello-powersync/composeApp/composeApp.podspec b/demos/hello-powersync/composeApp/composeApp.podspec
deleted file mode 100644
index 716d7345..00000000
--- a/demos/hello-powersync/composeApp/composeApp.podspec
+++ /dev/null
@@ -1,54 +0,0 @@
-Pod::Spec.new do |spec|
- spec.name = 'composeApp'
- spec.version = '1.0.0'
- spec.homepage = 'none'
- spec.source = { :http=> ''}
- spec.authors = ''
- spec.license = ''
- spec.summary = 'A shared library for Hello PowerSync app'
- spec.vendored_frameworks = 'build/cocoapods/framework/composeApp.framework'
- spec.libraries = 'c++'
- spec.ios.deployment_target = '15.2'
- spec.dependency 'powersync-sqlite-core', '0.3.12'
-
- if !Dir.exist?('build/cocoapods/framework/composeApp.framework') || Dir.empty?('build/cocoapods/framework/composeApp.framework')
- raise "
-
- Kotlin framework 'composeApp' doesn't exist yet, so a proper Xcode project can't be generated.
- 'pod install' should be executed after running ':generateDummyFramework' Gradle task:
-
- ./gradlew :composeApp:generateDummyFramework
-
- Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
- end
-
- spec.xcconfig = {
- 'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
- }
-
- spec.pod_target_xcconfig = {
- 'KOTLIN_PROJECT_PATH' => ':composeApp',
- 'PRODUCT_MODULE_NAME' => 'composeApp',
- }
-
- spec.script_phases = [
- {
- :name => 'Build composeApp',
- :execution_position => :before_compile,
- :shell_path => '/bin/sh',
- :script => <<-SCRIPT
- if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
- echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
- exit 0
- fi
- set -ev
- REPO_ROOT="$PODS_TARGET_SRCROOT"
- "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
- -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
- -Pkotlin.native.cocoapods.archs="$ARCHS" \
- -Pkotlin.native.cocoapods.configuration="$CONFIGURATION"
- SCRIPT
- }
- ]
- spec.resources = ['build/compose/cocoapods/compose-resources']
-end
\ No newline at end of file
diff --git a/demos/hello-powersync/composeApp/src/androidMain/AndroidManifest.xml b/demos/hello-powersync/composeApp/src/androidMain/AndroidManifest.xml
deleted file mode 100644
index dda1d84f..00000000
--- a/demos/hello-powersync/composeApp/src/androidMain/AndroidManifest.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demos/hello-powersync/composeApp/src/androidMain/kotlin/com/powersync/demos/MainActivity.kt b/demos/hello-powersync/composeApp/src/androidMain/kotlin/com/powersync/demos/MainActivity.kt
deleted file mode 100644
index 4209f49f..00000000
--- a/demos/hello-powersync/composeApp/src/androidMain/kotlin/com/powersync/demos/MainActivity.kt
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.powersync.demos
-
-import android.os.Bundle
-import androidx.activity.ComponentActivity
-import androidx.activity.compose.setContent
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.tooling.preview.Preview
-import com.powersync.sync.SyncStatus
-
-class MainActivity : ComponentActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
-
- setContent {
- App()
- }
- }
-}
-
-@Preview
-@Composable
-fun ViewContentPreview() {
- ViewContent(
- "Preview",
- listOf(User("1", "John Doe", "john@example.com")),
- {},
- {},
- SyncStatus.empty(),
- {},
- {},
- )
-}
-
-@Preview
-@Composable
-fun ViewContentPreview_ListItem() {
- ListItem(cols = arrayOf("John Doe", "john@example.com"))
-}
-
-@Preview
-@Composable
-fun ViewContentPreview_MyButton() {
- MyButton(label = "Preview Button", onClick = {})
-}
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml b/demos/hello-powersync/composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml
deleted file mode 100644
index 2b068d11..00000000
--- a/demos/hello-powersync/composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/drawable/ic_launcher_background.xml b/demos/hello-powersync/composeApp/src/androidMain/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index 07d5da9c..00000000
--- a/demos/hello-powersync/composeApp/src/androidMain/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index eca70cfe..00000000
--- a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index a571e600..00000000
Binary files a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 61da551c..00000000
Binary files a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c41dd285..00000000
Binary files a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index db5080a7..00000000
Binary files a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 6dba46da..00000000
Binary files a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index da31a871..00000000
Binary files a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 15ac6817..00000000
Binary files a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index b216f2d3..00000000
Binary files a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index f25a4197..00000000
Binary files a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png b/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index e96783cc..00000000
Binary files a/demos/hello-powersync/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/values/strings.xml b/demos/hello-powersync/composeApp/src/androidMain/res/values/strings.xml
deleted file mode 100644
index f1f771db..00000000
--- a/demos/hello-powersync/composeApp/src/androidMain/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- HelloPowerSync
-
\ No newline at end of file
diff --git a/demos/hello-powersync/composeApp/src/androidMain/res/xml/network_security_config.xml b/demos/hello-powersync/composeApp/src/androidMain/res/xml/network_security_config.xml
deleted file mode 100644
index de61259a..00000000
--- a/demos/hello-powersync/composeApp/src/androidMain/res/xml/network_security_config.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- localhost
-
-
diff --git a/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/App.kt b/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/App.kt
deleted file mode 100644
index 2e1f444e..00000000
--- a/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/App.kt
+++ /dev/null
@@ -1,226 +0,0 @@
-package com.powersync.demos
-
-import androidx.compose.foundation.border
-import androidx.compose.foundation.clickable
-import androidx.compose.foundation.layout.*
-import androidx.compose.foundation.lazy.LazyColumn
-import androidx.compose.foundation.lazy.items
-import androidx.compose.material.*
-import androidx.compose.runtime.*
-import androidx.compose.ui.Alignment
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.draw.clip
-import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.platform.LocalLayoutDirection
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.dp
-import com.powersync.compose.rememberDatabaseDriverFactory
-import com.powersync.sync.SyncStatusData
-import kotlinx.coroutines.launch
-
-@Composable
-fun App() {
- val driverFactory = rememberDatabaseDriverFactory()
- val powerSync: PowerSync = remember { PowerSync(driverFactory) }
-
- var version by remember { mutableStateOf("Loading") }
- val scope = rememberCoroutineScope()
- val customers by powerSync.watchUsers().collectAsState(emptyList())
- val syncStatus by powerSync.db.currentStatus
- .asFlow()
- .collectAsState(powerSync.db.currentStatus)
-
- MaterialTheme {
- Surface(
- modifier = Modifier.fillMaxSize(),
- color = MaterialTheme.colors.background,
- ) {
- LaunchedEffect(powerSync) {
- scope.launch {
- version =
- """PowerSync version: ${powerSync.getPowersyncVersion()}"""
- }
- }
-
- ViewContent(
- version,
- users = customers,
- onCreate = {
- scope.launch {
- val person = generateRandomPerson()
- powerSync.createUser(person.first, person.second)
- }
- },
- onDelete = {
- scope.launch {
- powerSync.deleteUser()
- }
- },
- syncStatus = syncStatus,
- onConnect = {
- scope.launch {
- powerSync.connect()
- }
- },
- onDisconnect = {
- scope.launch {
- powerSync.disconnect()
- }
- },
- )
- }
- }
-}
-
-@Composable
-fun ViewContent(
- version: String,
- users: List,
- onCreate: () -> Unit,
- onDelete: () -> Unit,
- syncStatus: SyncStatusData,
- onConnect: () -> Unit,
- onDisconnect: () -> Unit,
-) {
- val layoutDirection = LocalLayoutDirection.current
- Scaffold(
- modifier = Modifier,
- topBar = {
- Box {
- TopAppBar(
- title = { Text("Hello PowerSync") },
- )
- }
- },
- content = { padding ->
- Box(modifier = Modifier.fillMaxSize()) {
- LazyColumn(
- contentPadding =
- PaddingValues(
- start = padding.calculateStartPadding(layoutDirection),
- top = padding.calculateTopPadding() + 8.dp,
- end = padding.calculateEndPadding(layoutDirection),
- bottom = padding.calculateBottomPadding() + 80.dp,
- ),
- ) {
- item {
- ListItem(
- "Name",
- "Email",
- style = TextStyle(fontWeight = FontWeight.Bold),
- modifier = Modifier.padding(bottom = 8.dp),
- divider = false,
- )
- }
- items(users) {
- ListItem(it.name, it.email)
- }
-
- item {
- Spacer(Modifier.height(24.dp))
-
- Row(
- modifier = Modifier.fillMaxWidth(),
- horizontalArrangement = Arrangement.SpaceAround,
- ) {
- Column {
- MyButton(label = "Create") {
- onCreate()
- }
- }
- Column {
- MyButton(label = "Delete") {
- onDelete()
- }
- }
- }
-
- Spacer(Modifier.height(24.dp))
-
- Row(
- modifier = Modifier.fillMaxWidth(),
- horizontalArrangement = Arrangement.SpaceAround,
- ) {
- Column {
- MyButton(label = "Connect") {
- onConnect()
- }
- }
- Column {
- MyButton(label = "Disconnect") {
- onDisconnect()
- }
- }
- }
- }
- }
- // This box should be at the bottom of the screen
- Box(modifier = Modifier.padding(24.dp).align(Alignment.BottomEnd)) {
- Column {
- Text(version)
- Text("""Connected: ${syncStatus.connected}""")
- Text("""Connecting: ${syncStatus.connecting}""")
- }
- }
- }
- },
- contentColor = Color.Unspecified,
- )
-}
-
-@Composable
-fun ListItem(
- vararg cols: String,
- modifier: Modifier = Modifier,
- style: TextStyle? = null,
- divider: Boolean = true,
-) {
- Box(modifier = modifier) {
- Box {
- Column(modifier = Modifier.fillMaxWidth()) {
- Row(modifier = Modifier.padding(horizontal = 16.dp)) {
- cols.forEach {
- Text(
- it,
- modifier = Modifier.weight(1f),
- style = style ?: LocalTextStyle.current,
- )
- }
- }
- }
-
- if (divider) {
- Divider(
- color = Color.Black,
- modifier = Modifier.align(Alignment.BottomStart),
- )
- }
- }
- }
-}
-
-@Composable
-fun MyButton(
- modifier: Modifier = Modifier,
- label: String,
- onClick: () -> Unit,
-) {
- Column(
- modifier =
- modifier
- .clip(MaterialTheme.shapes.large)
- .clickable(onClick = onClick)
- .border(
- width = 1.dp,
- color = MaterialTheme.colors.primarySurface,
- ).padding(horizontal = 16.dp, vertical = 16.dp),
- horizontalAlignment = Alignment.CenterHorizontally,
- ) {
- Text(
- label,
- style = MaterialTheme.typography.button,
- color = MaterialTheme.colors.primarySurface,
- )
- }
-}
diff --git a/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/AppSchema.kt b/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/AppSchema.kt
deleted file mode 100644
index 0a78f3f6..00000000
--- a/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/AppSchema.kt
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.powersync.demos
-
-import com.powersync.db.schema.Column
-import com.powersync.db.schema.Index
-import com.powersync.db.schema.IndexedColumn
-import com.powersync.db.schema.Schema
-import com.powersync.db.schema.Table
-
-val AppSchema: Schema = Schema(
- listOf(
- Table(
- name = "customers",
- columns = listOf(
- Column.text("name"),
- Column.text("email")
- ),
- indexes = listOf(
- Index("name", listOf(IndexedColumn.descending("name")))
- )
- )
- )
-)
-
-data class User(
- val id: String,
- val name: String,
- val email: String
-)
\ No newline at end of file
diff --git a/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/PowerSync.kt b/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/PowerSync.kt
deleted file mode 100644
index 383a3a6b..00000000
--- a/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/PowerSync.kt
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.powersync.demos
-
-import com.powersync.DatabaseDriverFactory
-import com.powersync.PowerSyncDatabase
-import com.powersync.connector.supabase.SupabaseConnector
-import com.powersync.db.getString
-import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.runBlocking
-
-class PowerSync(
- driverFactory: DatabaseDriverFactory,
-) {
- private val connector =
- SupabaseConnector(
- supabaseUrl = Config.SUPABASE_URL,
- supabaseKey = Config.SUPABASE_ANON_KEY,
- powerSyncEndpoint = Config.POWERSYNC_URL,
- )
- private val database = PowerSyncDatabase(driverFactory, AppSchema)
-
- val db: PowerSyncDatabase
- get() = database
-
- init {
- runBlocking {
- try {
- connector.login(Config.SUPABASE_USER_EMAIL, Config.SUPABASE_USER_PASSWORD)
- } catch (e: Exception) {
- println(
- "Could not connect to Supabase, have you configured an auth user and set `SUPABASE_USER_EMAIL` and `SUPABASE_USER_PASSWORD`?\n Error: $e",
- )
- }
- database.connect(connector)
- }
- }
-
- suspend fun getPowersyncVersion(): String = database.getPowerSyncVersion()
-
- fun watchUsers(): Flow> =
- database.watch("SELECT * FROM customers", mapper = { cursor ->
- User(
- id = cursor.getString("id"),
- name = cursor.getString("name"),
- email = cursor.getString("email"),
- )
- })
-
- suspend fun createUser(
- name: String,
- email: String,
- ) {
- database.writeTransaction { tx ->
- tx.execute(
- "INSERT INTO customers (id, name, email) VALUES (uuid(), ?, ?)",
- listOf(name, email),
- )
- }
- }
-
- suspend fun deleteUser(id: String? = null) {
- val targetId =
- id ?: database.getOptional("SELECT id FROM customers LIMIT 1", mapper = { cursor ->
- cursor.getString(0)!!
- })
- ?: return
-
- database.writeTransaction { tx ->
- tx.execute("DELETE FROM customers WHERE id = ?", listOf(targetId))
- }
- }
-
- suspend fun connect() {
- database.connect(connector)
- }
-
- suspend fun disconnect() {
- database.disconnect()
- }
-}
diff --git a/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/util.kt b/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/util.kt
deleted file mode 100644
index eaaddcf0..00000000
--- a/demos/hello-powersync/composeApp/src/commonMain/kotlin/com/powersync/demos/util.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.powersync.demos
-
-import kotlinx.datetime.Clock
-import kotlin.random.Random
-
-fun generateRandomPerson(): Pair {
- val names =
- listOf("John", "Jane", "Bob", "Alice", "Charlie", "Megan", "Mike", "Sally", "Joe", "Jill")
- val domains = listOf("gmail.com", "yahoo.com", "hotmail.com", "outlook.com")
-
- val random = Random(
- Clock.System.now().toEpochMilliseconds()
- )
-
- val num = random.nextInt(names.size)
-
- val name = names[random.nextInt(names.size)]
- val domain = domains[random.nextInt(domains.size)]
-
- val email = "${name.lowercase()}${num + 1}@$domain"
-
- return Pair(name, email)
-}
\ No newline at end of file
diff --git a/demos/hello-powersync/composeApp/src/commonMain/resources/compose-multiplatform.xml b/demos/hello-powersync/composeApp/src/commonMain/resources/compose-multiplatform.xml
deleted file mode 100644
index d7bf7955..00000000
--- a/demos/hello-powersync/composeApp/src/commonMain/resources/compose-multiplatform.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/demos/hello-powersync/composeApp/src/iosMain/kotlin/com/powersync/demos/MainViewController.kt b/demos/hello-powersync/composeApp/src/iosMain/kotlin/com/powersync/demos/MainViewController.kt
deleted file mode 100644
index 8a0d1c0b..00000000
--- a/demos/hello-powersync/composeApp/src/iosMain/kotlin/com/powersync/demos/MainViewController.kt
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.powersync.demos
-
-import androidx.compose.ui.window.ComposeUIViewController
-import com.powersync.DatabaseDriverFactory
-
-fun MainViewController() = ComposeUIViewController { App() }
diff --git a/demos/hello-powersync/composeApp/src/jvmMain/kotlin/com/powersync/demos/main.kt b/demos/hello-powersync/composeApp/src/jvmMain/kotlin/com/powersync/demos/main.kt
deleted file mode 100644
index faa6f45d..00000000
--- a/demos/hello-powersync/composeApp/src/jvmMain/kotlin/com/powersync/demos/main.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.powersync.demos
-
-import androidx.compose.ui.window.singleWindowApplication
-
-
-fun main() = singleWindowApplication {
- App()
-}
diff --git a/demos/hello-powersync/gradle.properties b/demos/hello-powersync/gradle.properties
deleted file mode 100644
index 6e5e786f..00000000
--- a/demos/hello-powersync/gradle.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-kotlin.code.style=official
-
-#Gradle
-org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"
-
-
-#Android
-android.nonTransitiveRClass=true
-android.useAndroidX=true
-
-#MPP
-kotlin.mpp.androidSourceSetLayoutVersion=2
-kotlin.mpp.enableCInteropCommonization=true
-kotlin.native.cacheKind.iosSimulatorArm64=none
-compose.kotlin.native.manageCacheKind=false
-
-#Development
-development=true
\ No newline at end of file
diff --git a/demos/hello-powersync/gradle/libs.versions.toml b/demos/hello-powersync/gradle/libs.versions.toml
deleted file mode 100644
index 002fda01..00000000
--- a/demos/hello-powersync/gradle/libs.versions.toml
+++ /dev/null
@@ -1,7 +0,0 @@
-[versions]
-buildKonfig = "0.15.1"
-
-[libraries]
-
-[plugins]
-buildKonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildKonfig" }
\ No newline at end of file
diff --git a/demos/hello-powersync/gradle/wrapper/gradle-wrapper.jar b/demos/hello-powersync/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 033e24c4..00000000
Binary files a/demos/hello-powersync/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/demos/hello-powersync/gradle/wrapper/gradle-wrapper.properties b/demos/hello-powersync/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index dec19f80..00000000
--- a/demos/hello-powersync/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-#Sat Mar 15 13:10:11 SAST 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
-networkTimeout=10000
-validateDistributionUrl=true
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/demos/hello-powersync/gradlew b/demos/hello-powersync/gradlew
deleted file mode 100755
index fcb6fca1..00000000
--- a/demos/hello-powersync/gradlew
+++ /dev/null
@@ -1,248 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright © 2015-2021 the original authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-#
-# Gradle start up script for POSIX generated by Gradle.
-#
-# Important for running:
-#
-# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
-# noncompliant, but you have some other compliant shell such as ksh or
-# bash, then to run this script, type that shell name before the whole
-# command line, like:
-#
-# ksh Gradle
-#
-# Busybox and similar reduced shells will NOT work, because this script
-# requires all of these POSIX shell features:
-# * functions;
-# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
-# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
-# * compound commands having a testable exit status, especially «case»;
-# * various built-in commands including «command», «set», and «ulimit».
-#
-# Important for patching:
-#
-# (2) This script targets any POSIX shell, so it avoids extensions provided
-# by Bash, Ksh, etc; in particular arrays are avoided.
-#
-# The "traditional" practice of packing multiple parameters into a
-# space-separated string is a well documented source of bugs and security
-# problems, so this is (mostly) avoided, by progressively accumulating
-# options in "$@", and eventually passing that to Java.
-#
-# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
-# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
-# see the in-line comments for details.
-#
-# There are tweaks for specific operating systems such as AIX, CygWin,
-# Darwin, MinGW, and NonStop.
-#
-# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
-# within the Gradle project.
-#
-# You can find Gradle at https://github.com/gradle/gradle/.
-#
-##############################################################################
-
-# Attempt to set APP_HOME
-
-# Resolve links: $0 may be a link
-app_path=$0
-
-# Need this for daisy-chained symlinks.
-while
- APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
- [ -h "$app_path" ]
-do
- ls=$( ls -ld "$app_path" )
- link=${ls#*' -> '}
- case $link in #(
- /*) app_path=$link ;; #(
- *) app_path=$APP_HOME$link ;;
- esac
-done
-
-# This is normally unused
-# shellcheck disable=SC2034
-APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD=maximum
-
-warn () {
- echo "$*"
-} >&2
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-} >&2
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "$( uname )" in #(
- CYGWIN* ) cygwin=true ;; #(
- Darwin* ) darwin=true ;; #(
- MSYS* | MINGW* ) msys=true ;; #(
- NONSTOP* ) nonstop=true ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD=$JAVA_HOME/jre/sh/java
- else
- JAVACMD=$JAVA_HOME/bin/java
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD=java
- if ! command -v java >/dev/null 2>&1
- then
- die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-fi
-
-# Increase the maximum file descriptors if we can.
-if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
- case $MAX_FD in #(
- max*)
- # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
- MAX_FD=$( ulimit -H -n ) ||
- warn "Could not query maximum file descriptor limit"
- esac
- case $MAX_FD in #(
- '' | soft) :;; #(
- *)
- # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
- ulimit -n "$MAX_FD" ||
- warn "Could not set maximum file descriptor limit to $MAX_FD"
- esac
-fi
-
-# Collect all arguments for the java command, stacking in reverse order:
-# * args from the command line
-# * the main class name
-# * -classpath
-# * -D...appname settings
-# * --module-path (only if needed)
-# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if "$cygwin" || "$msys" ; then
- APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
-
- JAVACMD=$( cygpath --unix "$JAVACMD" )
-
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- for arg do
- if
- case $arg in #(
- -*) false ;; # don't mess with options #(
- /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
- [ -e "$t" ] ;; #(
- *) false ;;
- esac
- then
- arg=$( cygpath --path --ignore --mixed "$arg" )
- fi
- # Roll the args list around exactly as many times as the number of
- # args, so each arg winds up back in the position where it started, but
- # possibly modified.
- #
- # NB: a `for` loop captures its iteration list before it begins, so
- # changing the positional parameters here affects neither the number of
- # iterations, nor the values presented in `arg`.
- shift # remove old arg
- set -- "$@" "$arg" # push replacement arg
- done
-fi
-
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Collect all arguments for the java command;
-# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-# shell script including quotes and variable substitutions, so put them in
-# double quotes to make sure that they get re-expanded; and
-# * put everything else in single quotes, so that it's not re-expanded.
-
-set -- \
- "-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
- org.gradle.wrapper.GradleWrapperMain \
- "$@"
-
-# Stop when "xargs" is not available.
-if ! command -v xargs >/dev/null 2>&1
-then
- die "xargs is not available"
-fi
-
-# Use "xargs" to parse quoted args.
-#
-# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
-#
-# In Bash we could simply go:
-#
-# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
-# set -- "${ARGS[@]}" "$@"
-#
-# but POSIX shell has neither arrays nor command substitution, so instead we
-# post-process each arg (as a line of input to sed) to backslash-escape any
-# character that might be a shell metacharacter, then use eval to reverse
-# that process (while maintaining the separation between arguments), and wrap
-# the whole thing up as a single "set" statement.
-#
-# This will of course break if any of these variables contains a newline or
-# an unmatched quote.
-#
-
-eval "set -- $(
- printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
- xargs -n1 |
- sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
- tr '\n' ' '
- )" '"$@"'
-
-exec "$JAVACMD" "$@"
diff --git a/demos/hello-powersync/gradlew.bat b/demos/hello-powersync/gradlew.bat
deleted file mode 100644
index 93e3f59f..00000000
--- a/demos/hello-powersync/gradlew.bat
+++ /dev/null
@@ -1,92 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%"=="" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%"=="" set DIRNAME=.
-@rem This is normally unused
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if %ERRORLEVEL% equ 0 goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if %ERRORLEVEL% equ 0 goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-set EXIT_CODE=%ERRORLEVEL%
-if %EXIT_CODE% equ 0 set EXIT_CODE=1
-if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
-exit /b %EXIT_CODE%
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/demos/hello-powersync/iosApp/Podfile b/demos/hello-powersync/iosApp/Podfile
deleted file mode 100644
index c7373f79..00000000
--- a/demos/hello-powersync/iosApp/Podfile
+++ /dev/null
@@ -1,6 +0,0 @@
-source 'https://cdn.cocoapods.org'
-target 'iosApp' do
- use_frameworks!
- platform :ios, '16.0'
- pod 'composeApp', :path => '../composeApp'
-end
\ No newline at end of file
diff --git a/demos/hello-powersync/iosApp/Podfile.lock b/demos/hello-powersync/iosApp/Podfile.lock
deleted file mode 100644
index 0f707dfb..00000000
--- a/demos/hello-powersync/iosApp/Podfile.lock
+++ /dev/null
@@ -1,23 +0,0 @@
-PODS:
- - composeApp (1.0.0):
- - powersync-sqlite-core (= 0.3.12)
- - powersync-sqlite-core (0.3.12)
-
-DEPENDENCIES:
- - composeApp (from `../composeApp`)
-
-SPEC REPOS:
- trunk:
- - powersync-sqlite-core
-
-EXTERNAL SOURCES:
- composeApp:
- :path: "../composeApp"
-
-SPEC CHECKSUMS:
- composeApp: 904d95008148b122d963aa082a29624b99d0f4e1
- powersync-sqlite-core: fcc32da5528fca9d50b185fcd777705c034e255b
-
-PODFILE CHECKSUM: 4680f51fbb293d1385fb2467ada435cc1f16ab3d
-
-COCOAPODS: 1.16.2
diff --git a/demos/hello-powersync/iosApp/iosApp.xcodeproj/project.pbxproj b/demos/hello-powersync/iosApp/iosApp.xcodeproj/project.pbxproj
deleted file mode 100644
index 1625063e..00000000
--- a/demos/hello-powersync/iosApp/iosApp.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,419 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 50;
- objects = {
-
-/* Begin PBXBuildFile section */
- 058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557BA273AAA24004C7B11 /* Assets.xcassets */; };
- 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; };
- 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; };
- 5B28882998C9AF022DAD2648 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 19C4AFE04F499A35C5A11951 /* Pods_iosApp.framework */; };
- 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
- 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
- 19C4AFE04F499A35C5A11951 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; };
- 3F8B814AA2E52E4B79904725 /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; };
- 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
- 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 77077E58F0E7BC2367C87092 /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- EF8A45596C10845FBC80C40F /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 5B28882998C9AF022DAD2648 /* Pods_iosApp.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 058557D7273AAEEB004C7B11 /* Preview Content */ = {
- isa = PBXGroup;
- children = (
- 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */,
- );
- path = "Preview Content";
- sourceTree = "";
- };
- 7555FF72242A565900829871 = {
- isa = PBXGroup;
- children = (
- 7555FF7D242A565900829871 /* iosApp */,
- 7555FF7C242A565900829871 /* Products */,
- DB96CDD0BBEDF8F2E237A8B6 /* Pods */,
- BE33A8774A8103F1A69AC4B1 /* Frameworks */,
- );
- sourceTree = "";
- };
- 7555FF7C242A565900829871 /* Products */ = {
- isa = PBXGroup;
- children = (
- 7555FF7B242A565900829871 /* iosApp.app */,
- );
- name = Products;
- sourceTree = "";
- };
- 7555FF7D242A565900829871 /* iosApp */ = {
- isa = PBXGroup;
- children = (
- 058557BA273AAA24004C7B11 /* Assets.xcassets */,
- 7555FF82242A565900829871 /* ContentView.swift */,
- 7555FF8C242A565B00829871 /* Info.plist */,
- 2152FB032600AC8F00CF470E /* iOSApp.swift */,
- 058557D7273AAEEB004C7B11 /* Preview Content */,
- );
- path = iosApp;
- sourceTree = "";
- };
- BE33A8774A8103F1A69AC4B1 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 19C4AFE04F499A35C5A11951 /* Pods_iosApp.framework */,
- );
- name = Frameworks;
- sourceTree = "";
- };
- DB96CDD0BBEDF8F2E237A8B6 /* Pods */ = {
- isa = PBXGroup;
- children = (
- 77077E58F0E7BC2367C87092 /* Pods-iosApp.debug.xcconfig */,
- 3F8B814AA2E52E4B79904725 /* Pods-iosApp.release.xcconfig */,
- );
- name = Pods;
- path = Pods;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 7555FF7A242A565900829871 /* iosApp */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */;
- buildPhases = (
- FD6F5E7B50FDDEA472B254A2 /* [CP] Check Pods Manifest.lock */,
- 7555FF77242A565900829871 /* Sources */,
- 7555FF79242A565900829871 /* Resources */,
- EF8A45596C10845FBC80C40F /* Frameworks */,
- BDEF1F2128374088F98D10FB /* [CP] Embed Pods Frameworks */,
- 2A09661A10CA625857E1B999 /* [CP] Copy Pods Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = iosApp;
- productName = iosApp;
- productReference = 7555FF7B242A565900829871 /* iosApp.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 7555FF73242A565900829871 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastSwiftUpdateCheck = 1130;
- LastUpgradeCheck = 1130;
- ORGANIZATIONNAME = orgName;
- TargetAttributes = {
- 7555FF7A242A565900829871 = {
- CreatedOnToolsVersion = 11.3.1;
- };
- };
- };
- buildConfigurationList = 7555FF76242A565900829871 /* Build configuration list for PBXProject "iosApp" */;
- compatibilityVersion = "Xcode 9.3";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 7555FF72242A565900829871;
- productRefGroup = 7555FF7C242A565900829871 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 7555FF7A242A565900829871 /* iosApp */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 7555FF79242A565900829871 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */,
- 058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 2A09661A10CA625857E1B999 /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Copy Pods Resources";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
- BDEF1F2128374088F98D10FB /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
- FD6F5E7B50FDDEA472B254A2 /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 7555FF77242A565900829871 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */,
- 7555FF83242A565900829871 /* ContentView.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 7555FFA3242A565B00829871 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 16.0;
- MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
- MTL_FAST_MATH = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- };
- name = Debug;
- };
- 7555FFA4242A565B00829871 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 16.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- MTL_FAST_MATH = YES;
- SDKROOT = iphoneos;
- SWIFT_COMPILATION_MODE = wholemodule;
- SWIFT_OPTIMIZATION_LEVEL = "-O";
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- 7555FFA6242A565B00829871 /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 77077E58F0E7BC2367C87092 /* Pods-iosApp.debug.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
- ENABLE_PREVIEWS = YES;
- INFOPLIST_FILE = iosApp/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 16.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- 7555FFA7242A565B00829871 /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 3F8B814AA2E52E4B79904725 /* Pods-iosApp.release.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
- ENABLE_PREVIEWS = YES;
- INFOPLIST_FILE = iosApp/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 16.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 7555FF76242A565900829871 /* Build configuration list for PBXProject "iosApp" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 7555FFA3242A565B00829871 /* Debug */,
- 7555FFA4242A565B00829871 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 7555FFA6242A565B00829871 /* Debug */,
- 7555FFA7242A565B00829871 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 7555FF73242A565900829871 /* Project object */;
-}
diff --git a/demos/hello-powersync/iosApp/iosApp.xcworkspace/contents.xcworkspacedata b/demos/hello-powersync/iosApp/iosApp.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index c009e7d7..00000000
--- a/demos/hello-powersync/iosApp/iosApp.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
diff --git a/demos/hello-powersync/iosApp/iosApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/demos/hello-powersync/iosApp/iosApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d98100..00000000
--- a/demos/hello-powersync/iosApp/iosApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json b/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json
deleted file mode 100644
index ee7e3ca0..00000000
--- a/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "colors" : [
- {
- "idiom" : "universal"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
\ No newline at end of file
diff --git a/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index 8edf56e7..00000000
--- a/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "images" : [
- {
- "filename" : "app-icon-1024.png",
- "idiom" : "universal",
- "platform" : "ios",
- "size" : "1024x1024"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png b/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png
deleted file mode 100644
index 53fc536f..00000000
Binary files a/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png and /dev/null differ
diff --git a/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/Contents.json b/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/Contents.json
deleted file mode 100644
index 4aa7c535..00000000
--- a/demos/hello-powersync/iosApp/iosApp/Assets.xcassets/Contents.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
\ No newline at end of file
diff --git a/demos/hello-powersync/iosApp/iosApp/ContentView.swift b/demos/hello-powersync/iosApp/iosApp/ContentView.swift
deleted file mode 100644
index cb095b30..00000000
--- a/demos/hello-powersync/iosApp/iosApp/ContentView.swift
+++ /dev/null
@@ -1,21 +0,0 @@
-import UIKit
-import SwiftUI
-import composeApp
-
-struct ComposeView: UIViewControllerRepresentable {
- func makeUIViewController(context: Context) -> UIViewController {
- MainViewControllerKt.MainViewController()
- }
-
- func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
-}
-
-struct ContentView: View {
- var body: some View {
- ComposeView()
- .ignoresSafeArea(.keyboard) // Compose has own keyboard handler
- }
-}
-
-
-
diff --git a/demos/hello-powersync/iosApp/iosApp/Info.plist b/demos/hello-powersync/iosApp/iosApp/Info.plist
deleted file mode 100644
index aaf5e182..00000000
--- a/demos/hello-powersync/iosApp/iosApp/Info.plist
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
- CADisableMinimumFrameDurationOnPhone
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- $(PRODUCT_BUNDLE_PACKAGE_TYPE)
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 1
- LSRequiresIPhoneOS
-
- UIApplicationSceneManifest
-
- UIApplicationSupportsMultipleScenes
-
-
- UILaunchScreen
-
- UIRequiredDeviceCapabilities
-
- armv7
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
-
-
diff --git a/demos/hello-powersync/iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json b/demos/hello-powersync/iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json
deleted file mode 100644
index 4aa7c535..00000000
--- a/demos/hello-powersync/iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
\ No newline at end of file
diff --git a/demos/hello-powersync/iosApp/iosApp/iOSApp.swift b/demos/hello-powersync/iosApp/iosApp/iOSApp.swift
deleted file mode 100644
index 0648e860..00000000
--- a/demos/hello-powersync/iosApp/iosApp/iOSApp.swift
+++ /dev/null
@@ -1,10 +0,0 @@
-import SwiftUI
-
-@main
-struct iOSApp: App {
- var body: some Scene {
- WindowGroup {
- ContentView()
- }
- }
-}
\ No newline at end of file
diff --git a/demos/hello-powersync/settings.gradle.kts b/demos/hello-powersync/settings.gradle.kts
deleted file mode 100644
index 9064f80c..00000000
--- a/demos/hello-powersync/settings.gradle.kts
+++ /dev/null
@@ -1,42 +0,0 @@
-enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
-
-pluginManagement {
- repositories {
- maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
- google()
- gradlePluginPortal()
- mavenCentral()
- }
-}
-
-dependencyResolutionManagement {
- @Suppress("UnstableApiUsage")
- repositories {
- google()
- mavenCentral()
- maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
- }
- versionCatalogs {
- create("projectLibs") {
- from(files("../../gradle/libs.versions.toml"))
- }
- }
-}
-
-rootProject.name = "hello-powersync"
-
-include(":composeApp")
-
-includeBuild("../..") {
- dependencySubstitution {
- substitute(module("com.powersync:core"))
- .using(project(":core"))
- .because("we want to auto-wire up sample dependency")
- substitute(module("com.powersync:connector-supabase"))
- .using(project(":connectors:supabase"))
- .because("we want to auto-wire up sample dependency")
- substitute(module("com.powersync:compose"))
- .using(project(":compose"))
- .because("we want to auto-wire up sample dependency")
- }
-}
diff --git a/demos/supabase-todolist/README.md b/demos/supabase-todolist/README.md
index dfe3e7b2..4adbf298 100644
--- a/demos/supabase-todolist/README.md
+++ b/demos/supabase-todolist/README.md
@@ -41,8 +41,7 @@ all items have been received.
1. Clone this repo: ```git clone https://github.com/powersync-ja/powersync-kotlin.git```
2. Open the repo in Android Studio. This creates a `local.properties` file in root and should contain a `sdk.dir=/path/to/android/sdk` line.
3. Sync the project with Gradle (this should happen automatically, or choose File > Sync project with Gradle Files).
-4. Open the `demos/supabase-todolist` directory in Android Studio and sync this project with Gradle.
-5. Insert your Supabase project URL, Supabase Anon Key, and PowerSync instance URL into the `local.properties` file:
+4. Insert your Supabase project URL, Supabase Anon Key, and PowerSync instance URL into the `demos/supabase-todlist/local.properties` file:
```bash
# local.properties
diff --git a/demos/supabase-todolist/androidApp/build.gradle.kts b/demos/supabase-todolist/androidApp/build.gradle.kts
index 74286a46..13dcd13a 100644
--- a/demos/supabase-todolist/androidApp/build.gradle.kts
+++ b/demos/supabase-todolist/androidApp/build.gradle.kts
@@ -10,7 +10,7 @@ kotlin {
sourceSets {
val androidMain by getting {
dependencies {
- implementation(project(":shared"))
+ implementation(projects.demos.supabaseTodolist.shared)
implementation(compose.material)
}
}
diff --git a/demos/supabase-todolist/androidBackgroundSync/build.gradle.kts b/demos/supabase-todolist/androidBackgroundSync/build.gradle.kts
index c52e9cee..d8144eed 100644
--- a/demos/supabase-todolist/androidBackgroundSync/build.gradle.kts
+++ b/demos/supabase-todolist/androidBackgroundSync/build.gradle.kts
@@ -1,6 +1,6 @@
plugins {
- alias(libs.plugins.androidApplication)
- alias(libs.plugins.kotlinAndroid)
+ alias(libs.plugins.android.application)
+ alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
id("org.jetbrains.compose")
alias(libs.plugins.kotlin.atomicfu)
@@ -8,12 +8,12 @@ plugins {
android {
namespace = "com.powersync.demo.backgroundsync"
- compileSdk = 35
+ compileSdk = libs.versions.android.compileSdk.get().toInt()
defaultConfig {
applicationId = "com.powersync.demo.backgroundsync"
minSdk = 28
- targetSdk = 35
+ targetSdk = libs.versions.android.targetSdk.get().toInt()
versionCode = 1
versionName = "1.0"
@@ -42,17 +42,17 @@ android {
}
dependencies {
- // When copying this example, replace "latest.release" with the current version available
+ // When copying this example, use the the current version available
// at: https://central.sonatype.com/artifact/com.powersync/connector-supabase
- implementation("com.powersync:connector-supabase:latest.release")
+ implementation(projects.connectors.supabase) // "com.powersync:connector-supabase"
- implementation(projects.shared)
+ implementation(projects.demos.supabaseTodolist.shared)
implementation(compose.material)
implementation(libs.androidx.core)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.lifecycle.service)
- implementation(libs.compose.lifecycle)
+ implementation(libs.kmp.lifecycle.compose)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.koin.android)
implementation(libs.koin.compose.viewmodel)
diff --git a/demos/supabase-todolist/build.gradle.kts b/demos/supabase-todolist/build.gradle.kts
index 7cc95b1d..b39c10c9 100644
--- a/demos/supabase-todolist/build.gradle.kts
+++ b/demos/supabase-todolist/build.gradle.kts
@@ -1,10 +1,42 @@
+import java.util.Properties
+
plugins {
- alias(libs.plugins.androidApplication) apply false
- alias(libs.plugins.androidLibrary) apply false
- alias(libs.plugins.jetbrainsCompose) apply false
- alias(libs.plugins.compose.compiler) apply false
- alias(libs.plugins.kotlinMultiplatform) apply false
- alias(libs.plugins.kotlinAndroid) apply false
- alias(libs.plugins.cocoapods) apply false
- alias(libs.plugins.kotlin.atomicfu) apply false
+ alias(libs.plugins.buildKonfig) apply false
}
+
+val localProperties = Properties()
+val localPropertiesFile = project.file("local.properties")
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.inputStream().use { localProperties.load(it) }
+}
+
+val useReleasedVersions = localProperties.getProperty("USE_RELEASED_POWERSYNC_VERSIONS", "false") == "true"
+
+subprojects {
+ if (useReleasedVersions) {
+ configurations.all {
+ // https://docs.gradle.org/current/userguide/resolution_rules.html#sec:conditional-dependency-substitution
+ resolutionStrategy.dependencySubstitution.all {
+ requested.let {
+ if (it is ProjectComponentSelector) {
+ val projectPath = it.projectPath
+ if (projectPath.contains("demos")) {
+ // Project dependency within the demo, don't replace
+ return@let
+ }
+
+ // Translate a dependency of e.g. :core into com.powersync:core:latest.release,
+ // taking into account that the Supabase connector uses a custom name.
+ val moduleName = when (projectPath) {
+ ":connectors:supabase" -> "connector-supabase"
+ else -> it.projectPath.substring(1).replace(':', '-')
+ }
+
+ useTarget("com.powersync:${moduleName}:latest.release")
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/demos/supabase-todolist/desktopApp/build.gradle.kts b/demos/supabase-todolist/desktopApp/build.gradle.kts
index d40b4091..f0d65892 100644
--- a/demos/supabase-todolist/desktopApp/build.gradle.kts
+++ b/demos/supabase-todolist/desktopApp/build.gradle.kts
@@ -11,7 +11,7 @@ kotlin {
sourceSets {
jvmMain.dependencies {
implementation(compose.desktop.currentOs)
- implementation(projects.shared)
+ implementation(projects.demos.supabaseTodolist.shared)
}
}
}
diff --git a/demos/supabase-todolist/gradle.properties b/demos/supabase-todolist/gradle.properties
deleted file mode 100644
index 7e6b6dc2..00000000
--- a/demos/supabase-todolist/gradle.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-kotlin.code.style=official
-xcodeproj=./iosApp
-android.useAndroidX=true
-org.gradle.caching=true
-org.gradle.jvmargs=-Xmx3g
-org.jetbrains.compose.experimental.jscanvas.enabled=true
-org.jetbrains.compose.experimental.macos.enabled=true
-kotlin.mpp.androidSourceSetLayoutVersion=2
-kotlin.native.useEmbeddableCompilerJar=true
-# Enable kotlin/native experimental memory model
-kotlin.native.binary.memoryModel=experimental
diff --git a/demos/supabase-todolist/gradle/libs.versions.toml b/demos/supabase-todolist/gradle/libs.versions.toml
deleted file mode 100644
index d77deeb3..00000000
--- a/demos/supabase-todolist/gradle/libs.versions.toml
+++ /dev/null
@@ -1,82 +0,0 @@
-[versions]
-## SDK Versions
-android-minSdk = "24"
-android-targetSdk = "35"
-android-compileSdk = "35"
-java = "17"
-atomicfu = "0.29.0"
-
-# Dependencies
-kotlin = "2.2.0"
-coroutines = "1.10.2"
-kotlinx-datetime = "0.7.1"
-kotlinx-io = "0.8.0"
-ktor = "3.2.3"
-sqliteJdbc = "3.50.3.0"
-uuid = "0.8.4"
-buildKonfig = "0.17.1"
-koin-bom = "4.1.0"
-
-junit = "4.13.2"
-
-compose = "1.8.2"
-compose-preview = "1.8.3"
-lifecycle = "2.8.4"
-
-# plugins
-android-gradle-plugin = "8.11.1"
-
-# Sample - Android
-androidx-core = "1.16.0"
-androidx-activity-compose = "1.10.1"
-
-androidx-appcompat = "1.7.1"
-androidx-espresso-core = "3.7.0"
-androidx-material = "1.12.0"
-androidx-test-junit = "1.3.0"
-
-[libraries]
-sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version.ref = "sqliteJdbc" }
-test-junit = { group = "junit", name = "junit", version.ref = "junit" }
-test-junitKtx = { module = "androidx.test.ext:junit-ktx", version.ref = "androidx-test-junit" }
-test-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
-kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
-kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
-
-kotlinx-io = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version.ref = "kotlinx-io" }
-kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }
-kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
-
-uuid = { module = "com.benasher44:uuid", version.ref = "uuid" }
-ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
-ktor-client-ios = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" }
-ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
-ktor-client-contentnegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
-ktor-serialization-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
-kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
-kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
-
-androidx-core = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core" }
-androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" }
-androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
-androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-espresso-core" }
-androidx-material = { group = "com.google.android.material", name = "material", version.ref = "androidx-material" }
-androidx-lifecycle-service = { module = "androidx.lifecycle:lifecycle-service", version.ref = "lifecycle" }
-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose-preview" }
-compose-lifecycle = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle" }
-koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin-bom" }
-koin-compose-viewmodel = { module = "io.insert-koin:koin-compose-viewmodel", version.ref = "koin-bom" }
-koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin-bom" }
-
-[plugins]
-androidApplication = { id = "com.android.application", version.ref = "android-gradle-plugin" }
-androidLibrary = { id = "com.android.library", version.ref = "android-gradle-plugin" }
-jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose" }
-cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
-kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
-kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
-buildKonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildKonfig" }
-kotlin-atomicfu = { id = "org.jetbrains.kotlinx.atomicfu", version.ref = "atomicfu" }
-
-[bundles]
diff --git a/demos/supabase-todolist/gradle/wrapper/gradle-wrapper.jar b/demos/supabase-todolist/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 249e5832..00000000
Binary files a/demos/supabase-todolist/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/demos/supabase-todolist/gradle/wrapper/gradle-wrapper.properties b/demos/supabase-todolist/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 37f853b1..00000000
--- a/demos/supabase-todolist/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
-networkTimeout=10000
-validateDistributionUrl=true
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/demos/supabase-todolist/gradlew b/demos/supabase-todolist/gradlew
deleted file mode 100755
index a69d9cb6..00000000
--- a/demos/supabase-todolist/gradlew
+++ /dev/null
@@ -1,240 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright © 2015-2021 the original authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-#
-# Gradle start up script for POSIX generated by Gradle.
-#
-# Important for running:
-#
-# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
-# noncompliant, but you have some other compliant shell such as ksh or
-# bash, then to run this script, type that shell name before the whole
-# command line, like:
-#
-# ksh Gradle
-#
-# Busybox and similar reduced shells will NOT work, because this script
-# requires all of these POSIX shell features:
-# * functions;
-# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
-# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
-# * compound commands having a testable exit status, especially «case»;
-# * various built-in commands including «command», «set», and «ulimit».
-#
-# Important for patching:
-#
-# (2) This script targets any POSIX shell, so it avoids extensions provided
-# by Bash, Ksh, etc; in particular arrays are avoided.
-#
-# The "traditional" practice of packing multiple parameters into a
-# space-separated string is a well documented source of bugs and security
-# problems, so this is (mostly) avoided, by progressively accumulating
-# options in "$@", and eventually passing that to Java.
-#
-# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
-# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
-# see the in-line comments for details.
-#
-# There are tweaks for specific operating systems such as AIX, CygWin,
-# Darwin, MinGW, and NonStop.
-#
-# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
-# within the Gradle project.
-#
-# You can find Gradle at https://github.com/gradle/gradle/.
-#
-##############################################################################
-
-# Attempt to set APP_HOME
-
-# Resolve links: $0 may be a link
-app_path=$0
-
-# Need this for daisy-chained symlinks.
-while
- APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
- [ -h "$app_path" ]
-do
- ls=$( ls -ld "$app_path" )
- link=${ls#*' -> '}
- case $link in #(
- /*) app_path=$link ;; #(
- *) app_path=$APP_HOME$link ;;
- esac
-done
-
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-APP_NAME="Gradle"
-APP_BASE_NAME=${0##*/}
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD=maximum
-
-warn () {
- echo "$*"
-} >&2
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-} >&2
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "$( uname )" in #(
- CYGWIN* ) cygwin=true ;; #(
- Darwin* ) darwin=true ;; #(
- MSYS* | MINGW* ) msys=true ;; #(
- NONSTOP* ) nonstop=true ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD=$JAVA_HOME/jre/sh/java
- else
- JAVACMD=$JAVA_HOME/bin/java
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
- case $MAX_FD in #(
- max*)
- MAX_FD=$( ulimit -H -n ) ||
- warn "Could not query maximum file descriptor limit"
- esac
- case $MAX_FD in #(
- '' | soft) :;; #(
- *)
- ulimit -n "$MAX_FD" ||
- warn "Could not set maximum file descriptor limit to $MAX_FD"
- esac
-fi
-
-# Collect all arguments for the java command, stacking in reverse order:
-# * args from the command line
-# * the main class name
-# * -classpath
-# * -D...appname settings
-# * --module-path (only if needed)
-# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if "$cygwin" || "$msys" ; then
- APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
-
- JAVACMD=$( cygpath --unix "$JAVACMD" )
-
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- for arg do
- if
- case $arg in #(
- -*) false ;; # don't mess with options #(
- /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
- [ -e "$t" ] ;; #(
- *) false ;;
- esac
- then
- arg=$( cygpath --path --ignore --mixed "$arg" )
- fi
- # Roll the args list around exactly as many times as the number of
- # args, so each arg winds up back in the position where it started, but
- # possibly modified.
- #
- # NB: a `for` loop captures its iteration list before it begins, so
- # changing the positional parameters here affects neither the number of
- # iterations, nor the values presented in `arg`.
- shift # remove old arg
- set -- "$@" "$arg" # push replacement arg
- done
-fi
-
-# Collect all arguments for the java command;
-# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-# shell script including quotes and variable substitutions, so put them in
-# double quotes to make sure that they get re-expanded; and
-# * put everything else in single quotes, so that it's not re-expanded.
-
-set -- \
- "-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
- org.gradle.wrapper.GradleWrapperMain \
- "$@"
-
-# Stop when "xargs" is not available.
-if ! command -v xargs >/dev/null 2>&1
-then
- die "xargs is not available"
-fi
-
-# Use "xargs" to parse quoted args.
-#
-# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
-#
-# In Bash we could simply go:
-#
-# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
-# set -- "${ARGS[@]}" "$@"
-#
-# but POSIX shell has neither arrays nor command substitution, so instead we
-# post-process each arg (as a line of input to sed) to backslash-escape any
-# character that might be a shell metacharacter, then use eval to reverse
-# that process (while maintaining the separation between arguments), and wrap
-# the whole thing up as a single "set" statement.
-#
-# This will of course break if any of these variables contains a newline or
-# an unmatched quote.
-#
-
-eval "set -- $(
- printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
- xargs -n1 |
- sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
- tr '\n' ' '
- )" '"$@"'
-
-exec "$JAVACMD" "$@"
diff --git a/demos/supabase-todolist/gradlew.bat b/demos/supabase-todolist/gradlew.bat
deleted file mode 100644
index f127cfd4..00000000
--- a/demos/supabase-todolist/gradlew.bat
+++ /dev/null
@@ -1,91 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%"=="" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%"=="" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if %ERRORLEVEL% equ 0 goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if %ERRORLEVEL% equ 0 goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-set EXIT_CODE=%ERRORLEVEL%
-if %EXIT_CODE% equ 0 set EXIT_CODE=1
-if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
-exit /b %EXIT_CODE%
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/demos/supabase-todolist/settings.gradle.kts b/demos/supabase-todolist/settings.gradle.kts
deleted file mode 100644
index 3e4cd6c1..00000000
--- a/demos/supabase-todolist/settings.gradle.kts
+++ /dev/null
@@ -1,61 +0,0 @@
-import java.util.Properties
-
-enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
-
-pluginManagement {
- repositories {
- maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
- google()
- gradlePluginPortal()
- mavenCentral()
- }
-}
-
-val localProperties =
- Properties().apply {
- try {
- load(file("local.properties").reader())
- } catch (ignored: java.io.IOException) {
- throw Error("local.properties file not found")
- }
- }
-
-dependencyResolutionManagement {
- repositories {
- google()
- mavenCentral()
- maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
- }
-}
-
-plugins {
- id("org.gradle.toolchains.foojay-resolver-convention") version ("0.4.0")
-}
-
-rootProject.name = "supabase-todolist"
-
-include(":androidApp")
-include(":androidBackgroundSync")
-include(":shared")
-include(":desktopApp")
-
-val useReleasedVersions = localProperties.getProperty("USE_RELEASED_POWERSYNC_VERSIONS") == "true"
-
-if (!useReleasedVersions) {
- includeBuild("../..") {
- dependencySubstitution {
- val replacements = mapOf(
- "core" to "core",
- "persistence" to "persistence",
- "connector-supabase" to "connectors:supabase",
- "compose" to "compose"
- )
-
- replacements.forEach { (moduleName, projectName) ->
- substitute(module("com.powersync:$moduleName"))
- .using(project(":$projectName"))
- .because("we want to auto-wire up sample dependency")
- }
- }
- }
-}
diff --git a/demos/supabase-todolist/shared/build.gradle.kts b/demos/supabase-todolist/shared/build.gradle.kts
index 11ebc379..a3833520 100644
--- a/demos/supabase-todolist/shared/build.gradle.kts
+++ b/demos/supabase-todolist/shared/build.gradle.kts
@@ -3,7 +3,7 @@ import java.util.Properties
plugins {
alias(libs.plugins.kotlinMultiplatform)
- alias(libs.plugins.androidLibrary)
+ alias(libs.plugins.android.library)
alias(libs.plugins.jetbrainsCompose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.cocoapods)
@@ -39,19 +39,19 @@ kotlin {
}
sourceSets {
commonMain.dependencies {
- // Need to use api here otherwise Database driver can't be accessed
- // When copying this example, replace "latest.release" with the current version available
+ // When copying this example, use the current version available
// at: https://central.sonatype.com/artifact/com.powersync/core
- api("com.powersync:core:latest.release")
- implementation("com.powersync:connector-supabase:latest.release")
- implementation("com.powersync:compose:latest.release")
+ api(projects.core) // "com.powersync:core"
+ implementation(projects.connectors.supabase) // "com.powersync:connector-supabase"
+ implementation(projects.compose) // "com.powersync:compose"
implementation(libs.uuid)
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.components.resources)
implementation(compose.materialIconsExtended)
- implementation(libs.compose.lifecycle)
+ implementation(libs.kmp.lifecycle.compose)
+ implementation(libs.supabase.client)
api(libs.koin.core)
implementation(libs.koin.compose.viewmodel)
}
@@ -99,10 +99,9 @@ android {
val localProperties =
Properties().apply {
- try {
- load(rootProject.file("local.properties").reader())
- } catch (ignored: java.io.IOException) {
- throw Error("local.properties file not found")
+ val localPropertiesFile = parent!!.file("local.properties")
+ if (localPropertiesFile.exists()) {
+ localPropertiesFile.inputStream().use { load(it) }
}
}
@@ -115,9 +114,9 @@ buildkonfig {
val propValue = localProperties.getProperty(name, "")
if (propValue.isBlank()) {
println("Warning: Property $name not found in local.properties")
- } else {
- buildConfigField(STRING, name, propValue)
}
+
+ buildConfigField(STRING, name, propValue)
}
stringConfigField("POWERSYNC_URL")
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 7e2529a8..3dfdc7e3 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -28,9 +28,12 @@ stately = "2.1.0"
supabase = "3.2.2"
junit = "4.13.2"
-compose = "1.6.11"
+compose = "1.8.2" # This is for the multiplatform compose
+androidCompose = "2025.07.00"
compose-preview = "1.8.3"
+compose-lifecycle = "2.9.1"
androidxSqlite = "2.5.2"
+androidxSplashscreen = "1.0.1"
# plugins
android-gradle-plugin = "8.11.1"
@@ -42,17 +45,21 @@ mokkery = "2.9.0"
kotlinter = "5.1.1"
keeper = "0.16.1"
atomicfu = "0.29.0"
+buildKonfig = "0.17.1"
# Sample - Android
androidx-core = "1.16.0"
androidx-activity-compose = "1.10.1"
+materialIconsExtended = "1.7.8"
androidx-appcompat = "1.7.1"
androidx-espresso-core = "3.6.1"
+androidx-lifecycle = "2.9.2"
androidx-material = "1.12.0"
androidx-test-runner = "1.6.2"
androidx-test-rules = "1.6.1"
junitVersion = "1.2.1"
+koin-bom = "4.1.0"
[libraries]
configuration-annotations = { module = "co.touchlab.skie:configuration-annotations", version.ref = "configurationAnnotations" }
@@ -86,6 +93,7 @@ ktor-client-contentnegotiation = { module = "io.ktor:ktor-client-content-negotia
ktor-client-mock = { module = "io.ktor:ktor-client-mock", version.ref = "ktor" }
ktor-serialization-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
+kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
sqldelight-driver-native = { module = "app.cash.sqldelight:native-driver", version.ref = "sqlDelight" }
sqliter = { module = "co.touchlab:sqliter-driver", version.ref = "sqliter" }
@@ -107,16 +115,34 @@ androidx-sqliteFramework = { module = "androidx.sqlite:sqlite-framework", versio
# Sample - Android
androidx-core = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core" }
+androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "androidxSplashscreen" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
+androidx-activity-ktx = { group = "androidx.activity", name = "activity-ktx", version.ref = "androidx-activity-compose" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-espresso-core" }
+androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" }
+androidx-lifecycle-service = { group = "androidx.lifecycle", name = "lifecycle-service", version.ref = "androidx-lifecycle" }
+androidx-lifecycle-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" }
androidx-material = { group = "com.google.android.material", name = "material", version.ref = "androidx-material" }
+androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidCompose" }
+androidx-ui = { group = "androidx.compose.ui", name = "ui" }
+androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
+androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
+androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
+androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
+androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
+androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
+androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "materialIconsExtended" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose-preview" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin-bom" }
+koin-compose-viewmodel = { module = "io.insert-koin:koin-compose-viewmodel", version.ref = "koin-bom" }
+koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin-bom" }
+kmp-lifecycle-compose = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "compose-lifecycle" }
[plugins]
-androidApplication = { id = "com.android.application", version.ref = "android-gradle-plugin" }
-androidLibrary = { id = "com.android.library", version.ref = "android-gradle-plugin" }
+android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
+android-library = { id = "com.android.library", version.ref = "android-gradle-plugin" }
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
@@ -133,6 +159,7 @@ kotlinter = { id = "org.jmailen.kotlinter", version.ref = "kotlinter" }
keeper = { id = "com.slack.keeper", version.ref = "keeper" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-atomicfu = { id = "org.jetbrains.kotlinx.atomicfu", version.ref = "atomicfu" }
+buildKonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildKonfig" }
[bundles]
sqldelight = [
diff --git a/persistence/build.gradle.kts b/persistence/build.gradle.kts
index 69eaafb8..cea7015b 100644
--- a/persistence/build.gradle.kts
+++ b/persistence/build.gradle.kts
@@ -6,7 +6,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.sqldelight)
- alias(libs.plugins.androidLibrary)
+ alias(libs.plugins.android.library)
alias(libs.plugins.kotlinter)
id("com.powersync.plugins.sonatype")
}
diff --git a/plugins/sonatype/src/main/kotlin/com/powersync/plugins/utils/KmpUtils.kt b/plugins/sonatype/src/main/kotlin/com/powersync/plugins/utils/KmpUtils.kt
index 22d139ab..416b79f5 100644
--- a/plugins/sonatype/src/main/kotlin/com/powersync/plugins/utils/KmpUtils.kt
+++ b/plugins/sonatype/src/main/kotlin/com/powersync/plugins/utils/KmpUtils.kt
@@ -9,6 +9,7 @@ public fun KotlinTargetContainerWithPresetFunctions.powersyncTargets(
jvm: Boolean = true,
includeTargetsWithoutComposeSupport: Boolean = true,
watchOS: Boolean = true,
+ legacyJavaSupport: Boolean = true,
) {
if (jvm) {
androidTarget {
@@ -23,9 +24,14 @@ public fun KotlinTargetContainerWithPresetFunctions.powersyncTargets(
jvm {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
- jvmTarget.set(JvmTarget.JVM_1_8)
- // https://jakewharton.com/kotlins-jdk-release-compatibility-flag/
- freeCompilerArgs.add("-Xjdk-release=8")
+ if (legacyJavaSupport) {
+ jvmTarget.set(JvmTarget.JVM_1_8)
+ // https://jakewharton.com/kotlins-jdk-release-compatibility-flag/
+ freeCompilerArgs.add("-Xjdk-release=8")
+ } else {
+ jvmTarget.set(JvmTarget.JVM_11)
+ freeCompilerArgs.add("-Xjdk-release=11")
+ }
}
}
}
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 5d32ed81..2e885f43 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -1,6 +1,12 @@
pluginManagement {
repositories {
- google()
+ google {
+ content {
+ includeGroupByRegex("com\\.android.*")
+ includeGroupByRegex("com\\.google.*")
+ includeGroupByRegex("androidx.*")
+ }
+ }
gradlePluginPortal()
mavenCentral()
}
@@ -32,4 +38,12 @@ include(":PowerSyncKotlin")
include(":compose")
+include(":demos:android-supabase-todolist")
+include(":demos:supabase-todolist")
+include(":demos:supabase-todolist:androidApp")
+include(":demos:supabase-todolist:androidBackgroundSync")
+include(":demos:supabase-todolist:desktopApp")
+include(":demos:supabase-todolist:iosApp")
+include(":demos:supabase-todolist:shared")
+
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")