settings.gradle (2465B)
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("./plugins/apksize") 27 includeBuild("../gradle/plugins/nimbus-gradle-plugin") 28 } 29 30 plugins { 31 id 'mozac.DependenciesPlugin' 32 } 33 34 dependencyResolutionManagement { 35 versionCatalogs { 36 libs { 37 from(files("../../../gradle/libs.versions.toml")) 38 } 39 } 40 } 41 42 ext.topsrcdir = rootProject.projectDir.absolutePath.minus("mobile/android/fenix") 43 44 apply from: file('../shared-settings.gradle') 45 apply from: file('../autopublish-settings.gradle') 46 47 if (gradle.ext.mozconfig.substs.MOZ_APPSERVICES_IN_TREE) { 48 apply from: file("${topsrcdir}/services/app-services/settings.gradle") 49 } 50 51 include ':app' 52 include ':mozilla-detekt-rules' 53 include ':benchmark' 54 55 gradle.projectsLoaded { -> 56 // Disables A-C tests and lint when building Fenix. 57 gradle.allprojects { project -> 58 if (project.projectDir.absolutePath.contains("/android-components/")) { 59 project.tasks.withType(Test).configureEach { 60 enabled = false 61 } 62 project.tasks.configureEach { task -> 63 if (task.name.contains("lint")) { 64 task.enabled = false 65 } 66 } 67 } 68 } 69 } 70 71 def projectLocalProperties = file("local.properties").with { localPropertiesFile -> 72 def localProperties = new Properties() 73 if (localPropertiesFile.canRead()) { 74 localPropertiesFile.withInputStream { localProperties.load(it) } 75 } 76 localProperties 77 } 78 projectLocalProperties.each { prop -> 79 gradle.ext."localProperties.${prop.key}" = prop.value 80 }