Commit 46d99dba authored by brizental's avatar brizental
Browse files

fixup! TB 42669: [android] Use custom no-op app-services

parent 3db61ca7
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ def rootLocalProperties = new File(gradle.mozconfig.topsrcdir, "local.properties
[
    "autoPublish.application-services.dir",
    "autoPublish.glean.dir",
    "uniffiBindgenNoop.dir",
    "uniffiBindgenNoop.executable",
].each { key ->
    def relativeOrAbsolutePath = rootLocalProperties."$key"
    if (relativeOrAbsolutePath != null) {
@@ -41,8 +41,8 @@ def rootLocalProperties = new File(gradle.mozconfig.topsrcdir, "local.properties

gradle.settingsEvaluated {
    if (gradle.hasProperty("localProperties.autoPublish.application-services.dir")) {
        if (!gradle.hasProperty("localProperties.uniffiBindgenNoop.dir")) {
            throw new GradleException("Set uniffiBindgenNoop.dir to your local.properties in order to auto publish application-services.")
        if (!gradle.hasProperty("localProperties.uniffiBindgenNoop.executable")) {
            throw new GradleException("Set uniffiBindgenNoop.executable to your local.properties in order to auto publish application-services.")
        }

        def appServicesLocalPath = gradle."localProperties.autoPublish.application-services.dir"
@@ -53,15 +53,15 @@ gradle.settingsEvaluated {
        if (System.properties["os.name"].toLowerCase().contains("windows")) {
            publishAppServicesCmd << "py";
        }
        publishAppServicesCmd << "./automation/publish_to_maven_local_if_modified.py" << gradle."localProperties.uniffiBindgenNoop.dir";
        publishAppServicesCmd << "./automation/publish_to_maven_local_if_modified.py" << gradle."localProperties.uniffiBindgenNoop.executable";
        runCmd(publishAppServicesCmd, appServicesLocalPath, "Published application-services for local development.", false)
    } else {
        logger.lifecycle("settings.gradle> Disabled auto-publication of application-services. Enable it by settings 'autoPublish.application-services.dir' in local.properties")
    }

    if (gradle.hasProperty("localProperties.autoPublish.glean.dir")) {
        if (!gradle.hasProperty("localProperties.uniffiBindgenNoop.dir")) {
            throw new GradleException("Set uniffiBindgenNoop.dir to your local.properties in order to auto publish glean.")
        if (!gradle.hasProperty("localProperties.uniffiBindgenNoop.executable")) {
            throw new GradleException("Set uniffiBindgenNoop.executable to your local.properties in order to auto publish glean.")
        }

        def gleanLocalPath = gradle."localProperties.autoPublish.glean.dir"
@@ -74,7 +74,7 @@ gradle.settingsEvaluated {

        // We do not have a fork of Glean. In order for this to work, on your local
        // copy of the Glean repo, modify this python script to accept and use the uniffi-bindgen path.
        publishGleanCmd << "./build-scripts/publish_to_maven_local_if_modified.py" << gradle."localProperties.uniffiBindgenNoop.dir";
        publishGleanCmd << "./build-scripts/publish_to_maven_local_if_modified.py" << gradle."localProperties.uniffiBindgenNoop.executable";
        runCmd(publishGleanCmd, gleanLocalPath, "Published Glean for local development.", false)
    } else {
        logger.lifecycle("settings.gradle> Disabled auto-publication of Glean. Enable it by settings 'autoPublish.glean.dir' in local.properties")