Pier Angelo Vendrame pushed to branch tor-browser-153.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: e76d7d68 by Pier Angelo Vendrame at 2026-08-04T13:06:48+00:00 fixup! [android] Modify build system Revert "fixup! [android] Modify build system" This reverts commit b827102ad26c2e1b10cdee1ba4cb568e034f4020. - - - - - 7a41b6fc by Pier Angelo Vendrame at 2026-08-04T13:06:48+00:00 fixup! TB 42669: [android] Use custom no-op app-services Revert "fixup! TB 42669: [android] Use custom no-op app-services" This reverts commit becb4a94d8c9185a02c157f395cb0de2e079957c. - - - - - 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,12 +291,18 @@ 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,6 +28,11 @@ 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. * @@ -113,6 +118,17 @@ 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> - // 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) { + 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 + val fmlBinaryString = project.providers.provider { nimbusFmlPath } ===================================== mobile/android/moz.configure ===================================== @@ -216,8 +216,9 @@ def check_host_bin_prog(var, prog, toolchain=None): ) -check_host_bin_prog("EMBEDDED_UNIFFI_BINDGEN", "embedded-uniffi-bindgen") -check_host_bin_prog("NIMBUS_FML", "nimbus-fml") +# 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") project_flag( "MOZ_ANDROID_NETWORK_STATE", View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/fd46faa... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/fd46faa... 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)
-
Pier Angelo Vendrame (@pierov)