Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions demos/android-supabase-todolist/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ dependencies {
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
implementation("com.powersync:core")
implementation("com.powersync:connector-supabase")
implementation("com.powersync:compose")
// 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)
Expand Down
2 changes: 2 additions & 0 deletions demos/android-supabase-todolist/local.properties.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ sdk.dir=/Users/dominic/Library/Android/sdk
SUPABASE_URL=https://foo.supabase.co
SUPABASE_ANON_KEY=foo
POWERSYNC_URL=https://foo.powersync.journeyapps.com
# Set to true to use released PowerSync packages instead of the ones built locally.
USE_RELEASED_POWERSYNC_VERSIONS=false
39 changes: 27 additions & 12 deletions demos/android-supabase-todolist/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import java.util.Properties

pluginManagement {
repositories {
google {
Expand All @@ -15,23 +17,36 @@ dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
maven("https://jitpack.io")
maven("https://jitpack.io") {
content { includeGroup("com.github.requery") }
}
mavenCentral()
}
}

rootProject.name = "PowersyncAndroidExample"
include(":app")

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")
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")
}
}
}
31 changes: 16 additions & 15 deletions demos/supabase-todolist/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import java.util.Properties

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

pluginManagement {
repositories {
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
Expand All @@ -25,13 +27,6 @@ dependencyResolutionManagement {
maven("https://jitpack.io") {
content { includeGroup("com.github.requery") }
}
maven {
url = uri("https://maven.pkg.github.com/powersync-ja/powersync-kotlin")
credentials {
username = localProperties.getProperty("GITHUB_USERNAME", "")
password = localProperties.getProperty("GITHUB_TOKEN", "")
}
}
}
}

Expand All @@ -45,12 +40,18 @@ include(":androidApp")
include(":shared")
include(":desktopApp")

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")
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:persistence"))
.using(project(":persistence")).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")
}
}
}
}
6 changes: 4 additions & 2 deletions demos/supabase-todolist/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ kotlin {
sourceSets {
commonMain.dependencies {
// Need to use api here otherwise Database driver can't be accessed
api("com.powersync:core")
implementation("com.powersync:connector-supabase")
// When copying this example, replace "latest.release" with 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(libs.uuid)
implementation(compose.runtime)
implementation(compose.foundation)
Expand Down
Loading