Bug 1815939 - Clean up AC autopublish code in Fenix and Focus

fenix/112.0
Gabriel Luong 1 year ago committed by mergify[bot]
parent 90ab7a85e1
commit f19e9d7ee0

@ -195,16 +195,14 @@ To set the raptor manifest flag in Nightly, Beta and Release variants, add the f
raptorEnabled
```
### Auto-publication workflow for android-components and application-services
### Auto-publication workflow for application-services and glean
If you're making changes to these projects and want to test them in Fenix, auto-publication workflow is the fastest, most reliable
way to do that.
In `local.properties`, specify a relative path to your local `android-components` and/or `application-services` projects. E.g.:
- `autoPublish.android-components.dir=../firefox-android/android-components`
In `local.properties`, specify a relative path to your local `glean` and/or `application-services` projects. E.g.:
- `autoPublish.glean.dir=../glean`
- `autoPublish.application-services.dir=../application-services`
*Note that the Android Components project was already migrated to the new [firefox-android](https://github.com/mozilla-mobile/firefox-android) repository. Therefore, this auto publication workflow won't be neccessary for Android Components once Fenix is integrated in the new repository as well.*
Once these flags are set, your Fenix builds will include any local modifications present in these projects.
See a [demo of auto-publication workflow in action](https://www.youtube.com/watch?v=qZKlBzVvQGc).

@ -848,20 +848,6 @@ if (gradle.hasProperty('localProperties.dependencySubstitutions.geckoviewTopsrcd
apply from: "${topsrcdir}/substitute-local-geckoview.gradle"
}
def acSrcDir = null
if (gradle.hasProperty('localProperties.autoPublish.android-components.dir')) {
acSrcDir = gradle.getProperty('localProperties.autoPublish.android-components.dir')
} else if (gradle.hasProperty('localProperties.branchBuild.android-components.dir')) {
acSrcDir = gradle.getProperty('localProperties.branchBuild.android-components.dir')
}
if (acSrcDir) {
if (acSrcDir.startsWith("/")) {
apply from: "${acSrcDir}/substitute-local-ac.gradle"
} else {
apply from: "../${acSrcDir}/substitute-local-ac.gradle"
}
}
def appServicesSrcDir = null
if (gradle.hasProperty('localProperties.autoPublish.application-services.dir')) {
appServicesSrcDir = gradle.getProperty('localProperties.autoPublish.application-services.dir')

@ -133,7 +133,6 @@ def runCmd(cmd, workingDir, successMessage, captureStdout=true) {
Properties localProperties = null
String settingAppServicesPath = "autoPublish.application-services.dir"
String settingAndroidComponentsPath = "autoPublish.android-components.dir"
String settingGleanPath = "autoPublish.glean.dir"
if (file('local.properties').canRead()) {
@ -165,21 +164,6 @@ if (localProperties != null) {
log("Disabled auto-publication of application-services. Enable it by settings '$settingAppServicesPath' in local.properties")
}
String androidComponentsLocalPath = localProperties.getProperty(settingAndroidComponentsPath)
if (androidComponentsLocalPath != null) {
log("Enabling automatic publication of android-components from: $androidComponentsLocalPath")
// As above, hacks to execute .py files on Windows.
def publishAcCmd = [];
if (System.properties['os.name'].toLowerCase().contains('windows')) {
publishAcCmd << "py";
}
publishAcCmd << "./automation/publish_to_maven_local_if_modified.py";
runCmd(publishAcCmd, androidComponentsLocalPath, "Published android-components for local development.", false)
} else {
log("Disabled auto-publication of android-components. Enable it by settings '$settingAndroidComponentsPath' in local.properties")
}
String gleanLocalPath = localProperties.getProperty(settingGleanPath)
if (gleanLocalPath != null) {

Loading…
Cancel
Save