1+ import java.util.Properties
2+
13pluginManagement {
24 repositories {
35 google {
@@ -15,23 +17,36 @@ dependencyResolutionManagement {
1517 repositoriesMode.set(RepositoriesMode .FAIL_ON_PROJECT_REPOS )
1618 repositories {
1719 google()
18- maven(" https://jitpack.io" )
20+ maven(" https://jitpack.io" ) {
21+ content { includeGroup(" com.github.requery" ) }
22+ }
1923 mavenCentral()
2024 }
2125}
2226
2327rootProject.name = " PowersyncAndroidExample"
2428include(" :app" )
2529
26- includeBuild(" ../.." ) {
27- dependencySubstitution {
28- substitute(module(" com.powersync:core" ))
29- .using(project(" :core" )).because(" we want to auto-wire up sample dependency" )
30- substitute(module(" com.powersync:connector-supabase" ))
31- .using(project(" :connectors:supabase" ))
32- .because(" we want to auto-wire up sample dependency" )
33- substitute(module(" com.powersync:compose" ))
34- .using(project(" :compose" ))
35- .because(" we want to auto-wire up sample dependency" )
30+ val localProperties = Properties ().apply {
31+ try {
32+ load(file(" local.properties" ).reader())
33+ } catch (ignored: java.io.IOException ) {
34+ // ignore
3635 }
37- }
36+ }
37+ val useReleasedVersions = localProperties.getProperty(" USE_RELEASED_POWERSYNC_VERSIONS" ) == " true"
38+
39+ if (! useReleasedVersions) {
40+ includeBuild(" ../.." ) {
41+ dependencySubstitution {
42+ substitute(module(" com.powersync:core" ))
43+ .using(project(" :core" )).because(" we want to auto-wire up sample dependency" )
44+ substitute(module(" com.powersync:connector-supabase" ))
45+ .using(project(" :connectors:supabase" ))
46+ .because(" we want to auto-wire up sample dependency" )
47+ substitute(module(" com.powersync:compose" ))
48+ .using(project(" :compose" ))
49+ .because(" we want to auto-wire up sample dependency" )
50+ }
51+ }
52+ }
0 commit comments