diff --git a/WordPress/build.gradle b/WordPress/build.gradle index 8e74183734e5..b56b10c0751b 100644 --- a/WordPress/build.gradle +++ b/WordPress/build.gradle @@ -381,7 +381,12 @@ dependencies { } implementation "$gradle.ext.storiesAndroidMp4ComposePath:$automatticStoriesVersion" - implementation "com.automattic:Automattic-Tracks-Android:$automatticTracksVersion" + implementation("$gradle.ext.tracksBinaryPath") { + version { + strictly automatticTracksVersion + } + } + implementation ("com.automattic:rest:$automatticRestVersion") { exclude group: 'com.mcxiaoke.volley' } diff --git a/config/gradle/included_builds.gradle b/config/gradle/included_builds.gradle index 493a2dedb405..3d98d1c4b5e3 100644 --- a/config/gradle/included_builds.gradle +++ b/config/gradle/included_builds.gradle @@ -12,6 +12,7 @@ gradle.ext.aztecAndroidWordPressCommentsPath = "org.wordpress.aztec:wordpress-co gradle.ext.aztecAndroidGlideLoaderPath = "org.wordpress.aztec:glide-loader" gradle.ext.aztecAndroidPicassoLoaderPath = "org.wordpress.aztec:picasso-loader" gradle.ext.aboutAutomatticBinaryPath = "com.automattic:about" +gradle.ext.tracksBinaryPath = "com.automattic:Automattic-Tracks-Android" def localBuilds = new File("${rootDir}/local-builds.gradle") if (localBuilds.exists()) { @@ -97,4 +98,13 @@ if (localBuilds.exists()) { } } } + + if (ext.has("localTracksPath")) { + includeBuild(ext.localTracksPath) { + dependencySubstitution { + println "Substituting tracks with the local build" + substitute module("$gradle.ext.tracksBinaryPath") using project(':AutomatticTracks') + } + } + } } diff --git a/local-builds.gradle-example b/local-builds.gradle-example index 3ed77af540ee..79b280fabdab 100644 --- a/local-builds.gradle-example +++ b/local-builds.gradle-example @@ -21,4 +21,5 @@ ext { //localLoginFlowPath = "../WordPress-Login-Flow-Android" //localStoriesAndroidPath = "../stories-android" //localAztecAndroidPath = "../AztecEditor-Android" + //localTracksPath = "../Automattic-Tracks-Android" }