@@ -86,16 +86,21 @@ kotlin {
8686}
8787
8888val useReleasedVersions = getLocalProperty(" USE_RELEASED_POWERSYNC_VERSIONS" , " false" ) == " true"
89- if (! useReleasedVersions) {
89+ if (useReleasedVersions) {
9090 configurations.all {
9191 // https://docs.gradle.org/current/userguide/resolution_rules.html#sec:conditional-dependency-substitution
9292 resolutionStrategy.dependencySubstitution.all {
9393 requested.let {
94- if (it is ModuleComponentSelector && it.group == " com.powersync" ) {
95- val targetProject = findProject(" :${it.module} " )
96- if (targetProject != null ) {
97- useTarget(targetProject)
94+ if (it is ProjectComponentSelector ) {
95+ val projectPath = it.projectPath
96+ // Translate a dependency of e.g. :core into com.powersync:core:latest.release,
97+ // taking into account that the Supabase connector uses a custom name.
98+ val moduleName = when (projectPath) {
99+ " :connectors:supabase" -> " connector-supabase"
100+ else -> it.projectPath.substring(1 ).replace(' :' , ' -' )
98101 }
102+
103+ useTarget(" com.powersync:${moduleName} :latest.release" )
99104 }
100105 }
101106 }
@@ -120,11 +125,11 @@ dependencies {
120125 androidTestImplementation(libs.androidx.ui.test.junit4)
121126 debugImplementation(libs.androidx.ui.tooling)
122127 debugImplementation(libs.androidx.ui.test.manifest)
123- // To use a fixed version, replace "latest.release" with the latest version available at
128+ // When adopting the PowerSync dependencies into your project, use the latest version available at
124129 // https://central.sonatype.com/artifact/com.powersync/core
125- implementation(" com.powersync:core:latest.release" )
126- implementation(" com.powersync:connector-supabase:latest.release" )
127- implementation(" com.powersync:compose:latest.release" )
130+ implementation(projects.core) // "com.powersync:core:latest.release"
131+ implementation(projects.connectors.supabase) // "com.powersync:connector-supabase:latest.release"
132+ implementation(projects.compose) // "com.powersync:compose:latest.release"
128133 implementation(libs.uuid)
129134 implementation(libs.kermit)
130135 implementation(libs.androidx.material.icons.extended)
0 commit comments