|
|
@ -45,22 +45,14 @@ if (localProperties != null) {
|
|
|
|
|
|
|
|
|
|
|
|
if (appServicesLocalPath != null) {
|
|
|
|
if (appServicesLocalPath != null) {
|
|
|
|
log("Enabling automatic publication of application-services from: $appServicesLocalPath")
|
|
|
|
log("Enabling automatic publication of application-services from: $appServicesLocalPath")
|
|
|
|
def publishAppServicesCmd = ["./automation/publish_to_maven_local_if_modified.py"]
|
|
|
|
// Windows can't execute .py files directly, so we assume a "manually installed" python,
|
|
|
|
// Application-services doesn't build on native Windows. However, it still makes sense to
|
|
|
|
// which comes with a "py" launcher and respects the shebang line to specify the version.
|
|
|
|
// enable these workflows on Windows, even if it isn't quote as automatic as elsewhere -
|
|
|
|
def publishAppServicesCmd = [];
|
|
|
|
// specifically, you must run the build command on WSL, but after that you can happily build
|
|
|
|
|
|
|
|
// and debug directly from within Android Studio on native Windows - but only after following
|
|
|
|
|
|
|
|
// https://github.com/mozilla/application-services/blob/master/docs/howtos/setup-android-build-environment.md#using-windows
|
|
|
|
|
|
|
|
// So rather than fail we make noise...
|
|
|
|
|
|
|
|
if (System.properties['os.name'].toLowerCase().contains('windows')) {
|
|
|
|
if (System.properties['os.name'].toLowerCase().contains('windows')) {
|
|
|
|
log('NOTE: The autoPublish workflows do not work on native windows.');
|
|
|
|
publishAppServicesCmd << "py";
|
|
|
|
log('You must manually ensure that the following command has completed successfully in WSL:');
|
|
|
|
|
|
|
|
log("> $publishAppServicesCmd");
|
|
|
|
|
|
|
|
log("(from the '$appServicesLocalPath' directory)");
|
|
|
|
|
|
|
|
log('Then restart the build');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
runCmd(publishAppServicesCmd, appServicesLocalPath, "Published application-services for local development.", false)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publishAppServicesCmd << "./automation/publish_to_maven_local_if_modified.py";
|
|
|
|
|
|
|
|
runCmd(publishAppServicesCmd, appServicesLocalPath, "Published application-services for local development.", false)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
log("Disabled auto-publication of application-services. Enable it by settings '$settingAppServicesPath' in local.properties")
|
|
|
|
log("Disabled auto-publication of application-services. Enable it by settings '$settingAppServicesPath' in local.properties")
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -68,10 +60,8 @@ if (localProperties != null) {
|
|
|
|
String androidComponentsLocalPath = localProperties.getProperty(settingAndroidComponentsPath)
|
|
|
|
String androidComponentsLocalPath = localProperties.getProperty(settingAndroidComponentsPath)
|
|
|
|
|
|
|
|
|
|
|
|
if (androidComponentsLocalPath != null) {
|
|
|
|
if (androidComponentsLocalPath != null) {
|
|
|
|
// android-components does build on native windows, so it doesn't get the special Windows treatment above.
|
|
|
|
|
|
|
|
// But it doesn't like executing .py files directly. We assume a "manually installed" python,
|
|
|
|
|
|
|
|
// which comes with a "py" launcher and respects the shebang line to specify the version.
|
|
|
|
|
|
|
|
log("Enabling automatic publication of android-components from: $androidComponentsLocalPath")
|
|
|
|
log("Enabling automatic publication of android-components from: $androidComponentsLocalPath")
|
|
|
|
|
|
|
|
// As above, hacks to execute .py files on Windows.
|
|
|
|
def publishAcCmd = [];
|
|
|
|
def publishAcCmd = [];
|
|
|
|
if (System.properties['os.name'].toLowerCase().contains('windows')) {
|
|
|
|
if (System.properties['os.name'].toLowerCase().contains('windows')) {
|
|
|
|
publishAcCmd << "py";
|
|
|
|
publishAcCmd << "py";
|
|
|
|