brizental pushed to branch tor-browser-140.1.0esr-15.0-1 at The Tor Project / Applications / Tor Browser

Commits:

1 changed file:

Changes:

  • mobile/android/autopublish-settings.gradle
    ... ... @@ -30,6 +30,7 @@ def rootLocalProperties = new File(gradle.mozconfig.topsrcdir, "local.properties
    30 30
     [
    
    31 31
         "autoPublish.application-services.dir",
    
    32 32
         "autoPublish.glean.dir",
    
    33
    +    "uniffiBindgenNoop.dir",
    
    33 34
     ].each { key ->
    
    34 35
         def relativeOrAbsolutePath = rootLocalProperties."$key"
    
    35 36
         if (relativeOrAbsolutePath != null) {
    
    ... ... @@ -40,6 +41,10 @@ def rootLocalProperties = new File(gradle.mozconfig.topsrcdir, "local.properties
    40 41
     
    
    41 42
     gradle.settingsEvaluated {
    
    42 43
         if (gradle.hasProperty("localProperties.autoPublish.application-services.dir")) {
    
    44
    +        if (!gradle.hasProperty("localProperties.uniffiBindgenNoop.dir")) {
    
    45
    +            throw new GradleException("Set uniffiBindgenNoop.dir to your local.properties in order to auto publish application-services.")
    
    46
    +        }
    
    47
    +
    
    43 48
             def appServicesLocalPath = gradle."localProperties.autoPublish.application-services.dir"
    
    44 49
             logger.lifecycle("settings.gradle> Enabling automatic publication of application-services from: $appServicesLocalPath")
    
    45 50
             // Windows can't execute .py files directly, so we assume a "manually installed" python,
    
    ... ... @@ -48,13 +53,17 @@ gradle.settingsEvaluated {
    48 53
             if (System.properties["os.name"].toLowerCase().contains("windows")) {
    
    49 54
                 publishAppServicesCmd << "py";
    
    50 55
             }
    
    51
    -        publishAppServicesCmd << "./automation/publish_to_maven_local_if_modified.py";
    
    56
    +        publishAppServicesCmd << "./automation/publish_to_maven_local_if_modified.py" << gradle."localProperties.uniffiBindgenNoop.dir";
    
    52 57
             runCmd(publishAppServicesCmd, appServicesLocalPath, "Published application-services for local development.", false)
    
    53 58
         } else {
    
    54 59
             logger.lifecycle("settings.gradle> Disabled auto-publication of application-services. Enable it by settings 'autoPublish.application-services.dir' in local.properties")
    
    55 60
         }
    
    56 61
     
    
    57 62
         if (gradle.hasProperty("localProperties.autoPublish.glean.dir")) {
    
    63
    +        if (!gradle.hasProperty("localProperties.uniffiBindgenNoop.dir")) {
    
    64
    +            throw new GradleException("Set uniffiBindgenNoop.dir to your local.properties in order to auto publish glean.")
    
    65
    +        }
    
    66
    +
    
    58 67
             def gleanLocalPath = gradle."localProperties.autoPublish.glean.dir"
    
    59 68
             logger.lifecycle("settings.gradle> Enabling automatic publication of Glean from: $gleanLocalPath")
    
    60 69
             // As above, hacks to execute .py files on Windows.
    
    ... ... @@ -62,7 +71,10 @@ gradle.settingsEvaluated {
    62 71
             if (System.properties["os.name"].toLowerCase().contains("windows")) {
    
    63 72
                 publishGleanCmd << "py";
    
    64 73
             }
    
    65
    -        publishGleanCmd << "./build-scripts/publish_to_maven_local_if_modified.py";
    
    74
    +
    
    75
    +        // We do not have a fork of Glean. In order for this to work, on your local
    
    76
    +        // copy of the Glean repo, modify this python script to accept and use the uniffi-bindgen path.
    
    77
    +        publishGleanCmd << "./build-scripts/publish_to_maven_local_if_modified.py" << gradle."localProperties.uniffiBindgenNoop.dir";
    
    66 78
             runCmd(publishGleanCmd, gleanLocalPath, "Published Glean for local development.", false)
    
    67 79
         } else {
    
    68 80
             logger.lifecycle("settings.gradle> Disabled auto-publication of Glean. Enable it by settings 'autoPublish.glean.dir' in local.properties")