Commit e3dd1bf1 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃 Committed by henry
Browse files

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

TB 44360: Bring A-S's patch to NimbusAssembleToolsTask.groovy to Tor Browser.

Without this, the offline build in tor-browser-build fails because the
plugin tries to pull nimbus-fml from Mozilla's servers.
parent 1cdf04b5
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -23,6 +23,12 @@ import org.gradle.api.tasks.Nested
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.TaskAction

import java.io.File
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths
import java.nio.file.StandardCopyOption

import javax.inject.Inject

import groovy.transform.Immutable
@@ -151,6 +157,17 @@ abstract class NimbusAssembleToolsTask extends DefaultTask {

    @TaskAction
    void assembleTools() {
        String nimbusFml = System.getenv("NIMBUS_FML")
        if (nimbusFml == null || "".equals(nimbusFml)) {
            nimbusFml = System.getProperty("nimbusFml")
        }
        if (nimbusFml != null && !"".equals(nimbusFml)) {
            Path source = (new File(nimbusFml)).toPath()
            Path dest = fmlBinary.get().asFile.toPath()
            Files.copy(source, dest, StandardCopyOption.REPLACE_EXISTING)
            return
        }

        def binaryFile = fmlBinary.get().asFile
        def archiveFileObj = archiveFile.get().asFile
        def hashFileObj = hashFile.get().asFile