Skip to content

Commit

Permalink
[Gradle] Added tracks to included_builds.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Valdez authored and Andy Valdez committed Feb 15, 2024
1 parent a8f4a27 commit ff00333
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
10 changes: 10 additions & 0 deletions config/gradle/included_builds.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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')
}
}
}
}

0 comments on commit ff00333

Please sign in to comment.