Commit 1c2cd6e8 authored by Dan Ballard's avatar Dan Ballard
Browse files

fixup! [android] Modify build system

Always set gradle pref for nimbusFml as tbb's env var NIMBUS_FML supercedes it
parent 9e832b90
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -311,12 +311,14 @@ android.applicationVariants.configureEach { variant ->
    def isDebugOrDCD = isDebug || isDataCollectionDisabled
    def useReleaseVersioning = variant.buildType.buildConfigFields['USE_RELEASE_VERSIONING']?.value ?: false

    // only set this property to pass to our patched application-service if it's defined in
    // local.poperties, indicating this is a local dev build,
    // otherwise we are in a TBB build env and the env var should be set and will be picked up
    if (gradle.hasProperty('localProperties.dependencySubstitutions.geckoviewTopsrcdir')) {
        System.setProperty("nimbusFml", "${topsrcdir}/mobile/android/fenix/tools/nimbus-fml")
    }
    // env var NIMBUS_FML always overrides this in the tbb built patched application services
    // https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/blob/main/projects/application-services/offline-nimbus-fml.diff?ref_type=heads
    // so safe to have always set so local builds and supply their expected location as fetched by
    // fenix/tools/tba-fetch-deps.sh
    // We normalize the path because it is valid to open/build from both tb and fenix roots
    def normalizedTBPath = rootProject.projectDir.absolutePath.minus("mobile/android/fenix")
    System.setProperty("nimbusFml",  normalizedTBPath + "/mobile/android/fenix/tools/nimbus-fml")


    def disableTor = false
    if (project.hasProperty("disableTor")) {