Commit 7a41b6fc authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃 Committed by morgan
Browse files

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

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

This reverts commit becb4a94.
parent e76d7d68
Loading
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -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
+14 −14
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ 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.
@@ -131,7 +132,6 @@ class NimbusPlugin : Plugin<Project> {
            // interpret.  Hence, this explanation of the details.
            val nimbusFmlPath = mozconfigSubsts?.get("NIMBUS_FML") as? String

        if (nimbusFmlPath != null) {
            val fmlBinaryString = project.providers.provider {
                nimbusFmlPath
            }
+3 −2
Original line number Diff line number Diff line
@@ -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",