brizental pushed to branch tor-browser-153.0esr-16.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
b827102a
by Beatriz Rizental at 2026-07-31T03:43:54+02:00
-
becb4a94
by Beatriz Rizental at 2026-07-31T03:43:54+02:00
4 changed files:
- mobile/android/fenix/app/build.gradle
- mobile/android/gradle/plugins/nimbus-gradle-plugin/src/main/kotlin/org/mozilla/appservices/tooling/nimbus/NimbusAssembleToolsTask.kt
- mobile/android/gradle/plugins/nimbus-gradle-plugin/src/main/kotlin/org/mozilla/appservices/tooling/nimbus/NimbusGradlePlugin.kt
- mobile/android/moz.configure
Changes:
| ... | ... | @@ -291,18 +291,12 @@ androidComponents { |
| 291 | 291 | onVariants(selector().all()) { variant ->
|
| 292 | 292 | def buildType = variant.buildType
|
| 293 | 293 | |
| 294 | - // When this is set, a-s doesn't attempt to download NIMBUS_FML.
|
|
| 295 | - if (gradle.mozconfig.substs.NIMBUS_FML) {
|
|
| 296 | - System.setProperty("nimbusFml", gradle.mozconfig.substs.NIMBUS_FML)
|
|
| 297 | - }
|
|
| 298 | - |
|
| 299 | 294 | def disableTor = providers.gradleProperty("disableTor").getOrElse(false)
|
| 300 | 295 | |
| 301 | 296 | project.logger.debug("----------------------------------------------")
|
| 302 | 297 | project.logger.debug("Variant name: " + variant.name)
|
| 303 | 298 | project.logger.debug("Build type: " + buildType)
|
| 304 | 299 | project.logger.debug("Flavor: " + variant.flavorName)
|
| 305 | - project.logger.debug("nimbusFml: " + providers.gradleProperty("nimbusFml").getOrNull())
|
|
| 306 | 300 | project.logger.debug("Tor is disabled: " + disableTor)
|
| 307 | 301 | |
| 308 | 302 | variant.buildConfigFields.put("DISABLE_TOR", new BuildConfigField("boolean", "$disableTor", null))
|
| ... | ... | @@ -28,11 +28,6 @@ import java.net.URI |
| 28 | 28 | import java.security.MessageDigest
|
| 29 | 29 | import javax.inject.Inject
|
| 30 | 30 | |
| 31 | -import java.nio.file.Files
|
|
| 32 | -import java.nio.file.Path
|
|
| 33 | -import java.nio.file.Paths
|
|
| 34 | -import java.nio.file.StandardCopyOption
|
|
| 35 | - |
|
| 36 | 31 | /**
|
| 37 | 32 | * A task that fetches a prebuilt `nimbus-fml` binary for the current platform.
|
| 38 | 33 | *
|
| ... | ... | @@ -118,17 +113,6 @@ abstract class NimbusAssembleToolsTask : DefaultTask() { |
| 118 | 113 | |
| 119 | 114 | @TaskAction
|
| 120 | 115 | fun assembleTools() {
|
| 121 | - var nimbusFml = System.getenv("NIMBUS_FML") ?: ""
|
|
| 122 | - if (nimbusFml == "") {
|
|
| 123 | - nimbusFml = System.getProperty("nimbusFml", "")
|
|
| 124 | - }
|
|
| 125 | - if (nimbusFml != "") {
|
|
| 126 | - val source = File(nimbusFml).toPath()
|
|
| 127 | - val dest = fmlBinary.get().asFile.toPath()
|
|
| 128 | - Files.copy(source, dest, StandardCopyOption.REPLACE_EXISTING)
|
|
| 129 | - return
|
|
| 130 | - }
|
|
| 131 | - |
|
| 132 | 116 | val binaryFile = fmlBinary.get().asFile
|
| 133 | 117 | val archiveFileObj = archiveFile.get().asFile
|
| 134 | 118 | val hashFileObj = hashFile.get().asFile
|
| ... | ... | @@ -118,20 +118,20 @@ class NimbusPlugin : Plugin<Project> { |
| 118 | 118 | @Suppress("UNCHECKED_CAST")
|
| 119 | 119 | val mozconfigSubsts = mozconfig?.get("substs") as? Map<String, Any>
|
| 120 | 120 | |
| 121 | - if (mozconfigSubsts?.get("MOZ_APPSERVICES_IN_TREE").isTruthy()) {
|
|
| 122 | - // This is subtle. We capture `NIMBUS_FML` in the configuration cache as a `String`.
|
|
| 123 | - // If we access `project.gradle...` in the `provider` `Callable` below, we capture the
|
|
| 124 | - // `Project` in the configuration cache, which is not desirable.
|
|
| 125 | - //
|
|
| 126 | - // We can't produce a `File` immediately, because in some configurations, namely
|
|
| 127 | - // `android-gradle-dependencies` tasks, `NIMBUS_FML` is legitimately unset (`null`). So
|
|
| 128 | - // we pass strings around and map to `File` types lazily "by hand".
|
|
| 129 | - //
|
|
| 130 | - // Finally: if this process fails, including with an exception, the framework swallows
|
|
| 131 | - // the details and says something like `MissingValueException`, which can be hard to
|
|
| 132 | - // interpret. Hence, this explanation of the details.
|
|
| 133 | - val nimbusFmlPath = mozconfigSubsts?.get("NIMBUS_FML") as? String
|
|
| 134 | - |
|
| 121 | + // This is subtle. We capture `NIMBUS_FML` in the configuration cache as a `String`.
|
|
| 122 | + // If we access `project.gradle...` in the `provider` `Callable` below, we capture the
|
|
| 123 | + // `Project` in the configuration cache, which is not desirable.
|
|
| 124 | + //
|
|
| 125 | + // We can't produce a `File` immediately, because in some configurations, namely
|
|
| 126 | + // `android-gradle-dependencies` tasks, `NIMBUS_FML` is legitimately unset (`null`). So
|
|
| 127 | + // we pass strings around and map to `File` types lazily "by hand".
|
|
| 128 | + //
|
|
| 129 | + // Finally: if this process fails, including with an exception, the framework swallows
|
|
| 130 | + // the details and says something like `MissingValueException`, which can be hard to
|
|
| 131 | + // interpret. Hence, this explanation of the details.
|
|
| 132 | + val nimbusFmlPath = mozconfigSubsts?.get("NIMBUS_FML") as? String
|
|
| 133 | + |
|
| 134 | + if (nimbusFmlPath != null) {
|
|
| 135 | 135 | val fmlBinaryString = project.providers.provider {
|
| 136 | 136 | nimbusFmlPath
|
| 137 | 137 | }
|
| ... | ... | @@ -216,9 +216,8 @@ def check_host_bin_prog(var, prog, toolchain=None): |
| 216 | 216 | )
|
| 217 | 217 | |
| 218 | 218 | |
| 219 | -# tb-44669 - this was added in rebase 148 to make android compile but tracking potentially better fix
|
|
| 220 | -#check_host_bin_prog("EMBEDDED_UNIFFI_BINDGEN", "embedded-uniffi-bindgen")
|
|
| 221 | -#check_host_bin_prog("NIMBUS_FML", "nimbus-fml")
|
|
| 219 | +check_host_bin_prog("EMBEDDED_UNIFFI_BINDGEN", "embedded-uniffi-bindgen")
|
|
| 220 | +check_host_bin_prog("NIMBUS_FML", "nimbus-fml")
|
|
| 222 | 221 | |
| 223 | 222 | project_flag(
|
| 224 | 223 | "MOZ_ANDROID_NETWORK_STATE",
|