diff --git a/libs/editor/WordPressEditor/build.gradle b/libs/editor/WordPressEditor/build.gradle index ee10de91b9f7..5f33d1a4cfeb 100644 --- a/libs/editor/WordPressEditor/build.gradle +++ b/libs/editor/WordPressEditor/build.gradle @@ -70,11 +70,11 @@ dependencies { implementation 'com.android.volley:volley:1.1.1' implementation 'org.wordpress:utils:1.25' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" - api ("com.github.wordpress-mobile.WordPress-Aztec-Android:aztec:$aztecVersion") { + api ("$gradle.ext.aztecAndroidAztecPath:$aztecVersion") { exclude group: "com.android.volley" } - api ("com.github.wordpress-mobile.WordPress-Aztec-Android:wordpress-shortcodes:$aztecVersion") - api ("com.github.wordpress-mobile.WordPress-Aztec-Android:wordpress-comments:$aztecVersion") + api ("$gradle.ext.aztecAndroidWordPressShortcodesPath:$aztecVersion") + api ("$gradle.ext.aztecAndroidWordPressCommentsPath:$aztecVersion") // This dependency will be substituted if the `local-builds.gradle` file contains // `localGutenbergMobilePath`. Details for this can be found in the `settings.gradle` file. diff --git a/local-builds.gradle-example b/local-builds.gradle-example index 805b52ad5732..72617ad6c696 100644 --- a/local-builds.gradle-example +++ b/local-builds.gradle-example @@ -19,4 +19,5 @@ ext { //localGutenbergMobilePath = "../gutenberg-mobile" //localLoginFlowPath = "../WordPress-Login-Flow-Android" //localStoriesAndroidPath = "../stories-android" + //localAztecAndroidPath = "../AztecEditor-Android" } diff --git a/settings.gradle b/settings.gradle index 85b3844d0c65..139da3308384 100644 --- a/settings.gradle +++ b/settings.gradle @@ -22,6 +22,11 @@ gradle.ext.loginFlowBinaryPath = "org.wordpress:login" gradle.ext.storiesAndroidPath = "com.automattic:stories" gradle.ext.storiesAndroidMp4ComposePath = "com.automattic.stories:mp4compose" gradle.ext.storiesAndroidPhotoEditorPath = "com.automattic.stories:photoeditor" +gradle.ext.aztecAndroidAztecPath = "com.github.wordpress-mobile.WordPress-Aztec-Android:aztec" +gradle.ext.aztecAndroidWordPressShortcodesPath = "com.github.wordpress-mobile.WordPress-Aztec-Android:wordpress-shortcodes" +gradle.ext.aztecAndroidWordPressCommentsPath = "com.github.wordpress-mobile.WordPress-Aztec-Android:wordpress-comments" +gradle.ext.aztecAndroidGlideLoaderPath = "com.github.wordpress-mobile.WordPress-Aztec-Android:glide-loader" +gradle.ext.aztecAndroidPicassoLoaderPath = "com.github.wordpress-mobile.WordPress-Aztec-Android:picasso-loader" def localBuilds = new File('local-builds.gradle') if (localBuilds.exists()) { @@ -85,6 +90,19 @@ if (localBuilds.exists()) { } } } + + if (ext.has("localAztecAndroidPath")) { + includeBuild(ext.localAztecAndroidPath) { + dependencySubstitution { + println "Substituting AztecEditor-Android with the local build" + substitute module("$gradle.ext.aztecAndroidAztecPath") with project(':aztec') + substitute module("$gradle.ext.aztecAndroidWordPressShortcodesPath") with project(':wordpress-shortcodes') + substitute module("$gradle.ext.aztecAndroidWordPressCommentsPath") with project(':wordpress-comments') + substitute module("$gradle.ext.aztecAndroidGlideLoaderPath") with project(':glide-loader') + substitute module("$gradle.ext.aztecAndroidPicassoLoaderPath") with project(':picasso-loader') + } + } + } } // Build cache is only enabled for CI, at least for now