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 fixup! [android] Modify build system Bug 44898: Remove our custom handling of NIMBUS_FML environment variable in favour of upstream's. - - - - - becb4a94 by Beatriz Rizental at 2026-07-31T03:43:54+02:00 fixup! TB 42669: [android] Use custom no-op app-services Bug 44898: Remove our custom handling of NIMBUS_FML environment variable in favour of upstream's. - - - - - 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: ===================================== mobile/android/fenix/app/build.gradle ===================================== @@ -291,18 +291,12 @@ androidComponents { onVariants(selector().all()) { variant -> def buildType = variant.buildType - // When this is set, a-s doesn't attempt to download NIMBUS_FML. - if (gradle.mozconfig.substs.NIMBUS_FML) { - System.setProperty("nimbusFml", gradle.mozconfig.substs.NIMBUS_FML) - } - def disableTor = providers.gradleProperty("disableTor").getOrElse(false) project.logger.debug("----------------------------------------------") project.logger.debug("Variant name: " + variant.name) project.logger.debug("Build type: " + buildType) project.logger.debug("Flavor: " + variant.flavorName) - project.logger.debug("nimbusFml: " + providers.gradleProperty("nimbusFml").getOrNull()) project.logger.debug("Tor is disabled: " + disableTor) variant.buildConfigFields.put("DISABLE_TOR", new BuildConfigField("boolean", "$disableTor", null)) ===================================== mobile/android/gradle/plugins/nimbus-gradle-plugin/src/main/kotlin/org/mozilla/appservices/tooling/nimbus/NimbusAssembleToolsTask.kt ===================================== @@ -28,11 +28,6 @@ import java.net.URI import java.security.MessageDigest import javax.inject.Inject -import java.nio.file.Files -import java.nio.file.Path -import java.nio.file.Paths -import java.nio.file.StandardCopyOption - /** * A task that fetches a prebuilt `nimbus-fml` binary for the current platform. * @@ -118,17 +113,6 @@ abstract class NimbusAssembleToolsTask : DefaultTask() { @TaskAction fun assembleTools() { - var nimbusFml = System.getenv("NIMBUS_FML") ?: "" - if (nimbusFml == "") { - nimbusFml = System.getProperty("nimbusFml", "") - } - if (nimbusFml != "") { - val source = File(nimbusFml).toPath() - val dest = fmlBinary.get().asFile.toPath() - Files.copy(source, dest, StandardCopyOption.REPLACE_EXISTING) - return - } - val binaryFile = fmlBinary.get().asFile val archiveFileObj = archiveFile.get().asFile val hashFileObj = hashFile.get().asFile ===================================== mobile/android/gradle/plugins/nimbus-gradle-plugin/src/main/kotlin/org/mozilla/appservices/tooling/nimbus/NimbusGradlePlugin.kt ===================================== @@ -118,20 +118,20 @@ class NimbusPlugin : Plugin<Project> { @Suppress("UNCHECKED_CAST") val mozconfigSubsts = mozconfig?.get("substs") as? Map<String, Any> - if (mozconfigSubsts?.get("MOZ_APPSERVICES_IN_TREE").isTruthy()) { - // This is subtle. We capture `NIMBUS_FML` in the configuration cache as a `String`. - // If we access `project.gradle...` in the `provider` `Callable` below, we capture the - // `Project` in the configuration cache, which is not desirable. - // - // We can't produce a `File` immediately, because in some configurations, namely - // `android-gradle-dependencies` tasks, `NIMBUS_FML` is legitimately unset (`null`). So - // we pass strings around and map to `File` types lazily "by hand". - // - // Finally: if this process fails, including with an exception, the framework swallows - // the details and says something like `MissingValueException`, which can be hard to - // interpret. Hence, this explanation of the details. - val nimbusFmlPath = mozconfigSubsts?.get("NIMBUS_FML") as? String - + // This is subtle. We capture `NIMBUS_FML` in the configuration cache as a `String`. + // If we access `project.gradle...` in the `provider` `Callable` below, we capture the + // `Project` in the configuration cache, which is not desirable. + // + // We can't produce a `File` immediately, because in some configurations, namely + // `android-gradle-dependencies` tasks, `NIMBUS_FML` is legitimately unset (`null`). So + // we pass strings around and map to `File` types lazily "by hand". + // + // Finally: if this process fails, including with an exception, the framework swallows + // the details and says something like `MissingValueException`, which can be hard to + // interpret. Hence, this explanation of the details. + val nimbusFmlPath = mozconfigSubsts?.get("NIMBUS_FML") as? String + + if (nimbusFmlPath != null) { val fmlBinaryString = project.providers.provider { nimbusFmlPath } ===================================== mobile/android/moz.configure ===================================== @@ -216,9 +216,8 @@ def check_host_bin_prog(var, prog, toolchain=None): ) -# tb-44669 - this was added in rebase 148 to make android compile but tracking potentially better fix -#check_host_bin_prog("EMBEDDED_UNIFFI_BINDGEN", "embedded-uniffi-bindgen") -#check_host_bin_prog("NIMBUS_FML", "nimbus-fml") +check_host_bin_prog("EMBEDDED_UNIFFI_BINDGEN", "embedded-uniffi-bindgen") +check_host_bin_prog("NIMBUS_FML", "nimbus-fml") project_flag( "MOZ_ANDROID_NETWORK_STATE", View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/1676ad6... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/1676ad6... You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
participants (1)
-
brizental (@brizental)