Skip to content

Commit

Permalink
Merge pull request #20193 from wordpress-mobile/andy/add-tracks-inclu…
Browse files Browse the repository at this point in the history
…ded-build

[Gradle] Added tracks to included_builds.gradle
  • Loading branch information
irfano authored Feb 16, 2024
2 parents adfde43 + 4e138a5 commit 2741f03
Show file tree
Hide file tree
Showing 3 changed files with 17 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')
}
}
}
}
1 change: 1 addition & 0 deletions local-builds.gradle-example
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ ext {
//localLoginFlowPath = "../WordPress-Login-Flow-Android"
//localStoriesAndroidPath = "../stories-android"
//localAztecAndroidPath = "../AztecEditor-Android"
//localTracksPath = "../Automattic-Tracks-Android"
}

0 comments on commit 2741f03

Please sign in to comment.