tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

settings.gradle (2382B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 pluginManagement {
      6    if (!gradle.root.hasProperty("mozconfig")){
      7        apply from: file('../gradle/mozconfig.gradle')
      8    } else {
      9        gradle.ext.mozconfig = gradle.root.mozconfig
     10    }
     11 
     12    repositories {
     13        gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
     14            maven {
     15                url = repository
     16                if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
     17                    allowInsecureProtocol = true
     18                }
     19            }
     20        }
     21    }
     22 
     23    includeBuild("../android-components/plugins/publicsuffixlist")
     24    includeBuild("../android-components/plugins/dependencies")
     25    includeBuild("../android-components/plugins/config")
     26    includeBuild("../gradle/plugins/nimbus-gradle-plugin")
     27 }
     28 
     29 plugins {
     30    id 'mozac.DependenciesPlugin'
     31 }
     32 
     33 dependencyResolutionManagement {
     34    versionCatalogs {
     35        libs {
     36            from(files("../../../gradle/libs.versions.toml"))
     37        }
     38    }
     39 }
     40 
     41 ext.topsrcdir = rootProject.projectDir.absolutePath.minus("mobile/android/focus-android")
     42 
     43 apply from: file('../shared-settings.gradle')
     44 apply from: file('../autopublish-settings.gradle')
     45 
     46 if (gradle.ext.mozconfig.substs.MOZ_APPSERVICES_IN_TREE) {
     47    apply from: file("${topsrcdir}/services/app-services/settings.gradle")
     48 }
     49 
     50 include ':app'
     51 
     52 gradle.projectsLoaded { ->
     53    // Disables A-C tests and lint when building Focus.
     54    gradle.allprojects { project ->
     55        if (project.projectDir.absolutePath.contains("/android-components/")) {
     56            project.tasks.withType(Test).configureEach {
     57                enabled = false
     58            }
     59            project.tasks.configureEach { task ->
     60                if (task.name.contains("lint")) {
     61                    task.enabled = false
     62                }
     63            }
     64        }
     65    }
     66 }
     67 
     68 def projectLocalProperties = file("local.properties").with { localPropertiesFile ->
     69    def localProperties = new Properties()
     70    if (localPropertiesFile.canRead()) {
     71        localPropertiesFile.withInputStream { localProperties.load(it) }
     72    }
     73    localProperties
     74 }
     75 projectLocalProperties.each { prop ->
     76    gradle.ext."localProperties.${prop.key}" = prop.value
     77 }