Bug 1876335 - use GRADLE_MAVEN_REPOSITORIES in more places. r=owlish,geckoview-reviewers,nalexander,tthibaud,android-reviewers
To ensure that we can build offline, we need to prevent gradle from going through remote maven repos directly. That means also overriding the default plugin repository (plugins.gradle.org) in the `pluginManagement` section. Differential Revision: https://phabricator.services.mozilla.com/D201497
This commit is contained in:
@@ -9,12 +9,7 @@ import static org.gradle.api.tasks.testing.TestResult.ResultType
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
if (!System.env.MOZ_AUTOMATION && gradle.mozconfig.substs.MOZ_ARTIFACT_BUILDS) {
|
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
|
|
||||||
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
rootProject.logger.lifecycle("Adding GRADLE_MAVEN_REPOSITORIES ${repository}")
|
|
||||||
maven {
|
maven {
|
||||||
url repository
|
url repository
|
||||||
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
@@ -22,26 +17,6 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (project.hasProperty("googleRepo")) {
|
|
||||||
maven {
|
|
||||||
name "Google"
|
|
||||||
url project.property("googleRepo")
|
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
google()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (project.hasProperty("centralRepo")) {
|
|
||||||
maven {
|
|
||||||
name "MavenCentral"
|
|
||||||
url project.property("centralRepo")
|
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -65,12 +40,7 @@ plugins {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
if (!System.env.MOZ_AUTOMATION && gradle.mozconfig.substs.MOZ_ARTIFACT_BUILDS) {
|
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
|
|
||||||
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
rootProject.logger.lifecycle("Adding GRADLE_MAVEN_REPOSITORIES ${repository}")
|
|
||||||
maven {
|
maven {
|
||||||
url repository
|
url repository
|
||||||
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
@@ -78,38 +48,6 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (project.hasProperty("googleRepo")) {
|
|
||||||
maven {
|
|
||||||
name "Google"
|
|
||||||
url project.property("googleRepo")
|
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
google()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (project.hasProperty("centralRepo")) {
|
|
||||||
maven {
|
|
||||||
name "MavenCentral"
|
|
||||||
url project.property("centralRepo")
|
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
|
||||||
name "Mozilla"
|
|
||||||
url "https://maven.mozilla.org/maven2"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ExtraRepositories.mozillaStaging) {
|
|
||||||
maven {
|
|
||||||
name "Mozilla Staging"
|
|
||||||
url "https://maven-default.stage.mozaws.net/maven2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,13 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
url "https://maven.mozilla.org/maven2"
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,14 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
url "https://maven.mozilla.org/maven2"
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -4,14 +4,12 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
url "https://maven.mozilla.org/maven2"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ExtraRepositories.mozillaStaging) {
|
|
||||||
maven {
|
maven {
|
||||||
name "Mozilla Staging"
|
url repository
|
||||||
url "https://maven-default.stage.mozaws.net/maven2"
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,11 +3,14 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
url "https://maven.mozilla.org/maven2"
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath ComponentsDependencies.plugin_serialization
|
classpath ComponentsDependencies.plugin_serialization
|
||||||
|
|||||||
@@ -7,7 +7,14 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
|||||||
@@ -3,3 +3,17 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// Prevents gradle builds from looking for a root settings.gradle
|
// Prevents gradle builds from looking for a root settings.gradle
|
||||||
|
pluginManagement {
|
||||||
|
apply from: file('../../../gradle/mozconfig.gradle')
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,15 +7,14 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
if (project.hasProperty("centralRepo")) {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
maven {
|
maven {
|
||||||
name "MavenCentral"
|
url repository
|
||||||
url project.property("centralRepo")
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
|||||||
@@ -3,3 +3,17 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// Prevents gradle builds from looking for a root settings.gradle
|
// Prevents gradle builds from looking for a root settings.gradle
|
||||||
|
pluginManagement {
|
||||||
|
apply from: file('../../../gradle/mozconfig.gradle')
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,15 +7,14 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
if (project.hasProperty("centralRepo")) {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
maven {
|
maven {
|
||||||
name "MavenCentral"
|
url repository
|
||||||
url project.property("centralRepo")
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -5,6 +5,19 @@
|
|||||||
// Prevents gradle builds from looking for a root settings.gradle
|
// Prevents gradle builds from looking for a root settings.gradle
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
|
apply from: file('../../../gradle/mozconfig.gradle')
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
includeBuild("../dependencies")
|
includeBuild("../dependencies")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,13 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
url "https://maven.mozilla.org/maven2"
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -4,8 +4,13 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
url "https://maven.mozilla.org/maven2"
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -3,6 +3,19 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
|
apply from: file('../gradle/mozconfig.gradle')
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
includeBuild("plugins/dependencies")
|
includeBuild("plugins/dependencies")
|
||||||
includeBuild("plugins/publicsuffixlist")
|
includeBuild("plugins/publicsuffixlist")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,69 +10,11 @@ import java.nio.file.StandardCopyOption
|
|||||||
buildscript {
|
buildscript {
|
||||||
// This logic is duplicated in the allprojects block: I don't know how to fix that.
|
// This logic is duplicated in the allprojects block: I don't know how to fix that.
|
||||||
repositories {
|
repositories {
|
||||||
if (!System.env.MOZ_AUTOMATION && gradle.mozconfig.substs.MOZ_ARTIFACT_BUILDS) {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
|
||||||
name "Mozilla Nightly"
|
|
||||||
url "https://nightly.maven.mozilla.org/maven2"
|
|
||||||
content {
|
|
||||||
// Improve performance: only check moz maven for mozilla deps.
|
|
||||||
includeGroupByRegex RepoMatching.mozilla
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
|
||||||
name "Mozilla"
|
|
||||||
url "https://maven.mozilla.org/maven2"
|
|
||||||
content {
|
|
||||||
// Improve performance: only check moz maven for mozilla deps.
|
|
||||||
includeGroupByRegex RepoMatching.mozilla
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ExtraRepositories.mozillaStaging) {
|
|
||||||
maven {
|
maven {
|
||||||
name "Mozilla Staging"
|
url repository
|
||||||
url "https://maven-default.stage.mozaws.net/maven2"
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
content {
|
allowInsecureProtocol = true
|
||||||
// Improve performance: only check moz maven for mozilla deps.
|
|
||||||
includeGroupByRegex RepoMatching.mozilla
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (project.hasProperty("googleRepo")) {
|
|
||||||
maven {
|
|
||||||
name "Google"
|
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
|
||||||
url project.property("googleRepo")
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
google() {
|
|
||||||
content {
|
|
||||||
// Improve performance: only check google maven for google deps.
|
|
||||||
includeGroupByRegex RepoMatching.androidx
|
|
||||||
includeGroupByRegex RepoMatching.comAndroid
|
|
||||||
includeGroupByRegex RepoMatching.comGoogle
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (project.hasProperty("centralRepo")) {
|
|
||||||
maven {
|
|
||||||
name "MavenCentral"
|
|
||||||
url project.property("centralRepo")
|
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
mavenCentral() {
|
|
||||||
content {
|
|
||||||
// Improve security: don't search deps with known repos.
|
|
||||||
excludeGroupByRegex RepoMatching.mozilla
|
|
||||||
excludeGroupByRegex RepoMatching.androidx
|
|
||||||
excludeGroupByRegex RepoMatching.comAndroid
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,69 +51,11 @@ plugins {
|
|||||||
allprojects {
|
allprojects {
|
||||||
// This logic is duplicated in the buildscript block: I don't know how to fix that.
|
// This logic is duplicated in the buildscript block: I don't know how to fix that.
|
||||||
repositories {
|
repositories {
|
||||||
if (!System.env.MOZ_AUTOMATION && gradle.mozconfig.substs.MOZ_ARTIFACT_BUILDS) {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
|
||||||
name "Mozilla Nightly"
|
|
||||||
url "https://nightly.maven.mozilla.org/maven2"
|
|
||||||
content {
|
|
||||||
// Improve performance: only check moz maven for mozilla deps.
|
|
||||||
includeGroupByRegex RepoMatching.mozilla
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
|
||||||
name "Mozilla"
|
|
||||||
url "https://maven.mozilla.org/maven2"
|
|
||||||
content {
|
|
||||||
// Improve performance: only check moz maven for mozilla deps.
|
|
||||||
includeGroupByRegex RepoMatching.mozilla
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ExtraRepositories.mozillaStaging) {
|
|
||||||
maven {
|
maven {
|
||||||
name "Mozilla Staging"
|
url repository
|
||||||
url "https://maven-default.stage.mozaws.net/maven2"
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
content {
|
allowInsecureProtocol = true
|
||||||
// Improve performance: only check moz maven for mozilla deps.
|
|
||||||
includeGroupByRegex RepoMatching.mozilla
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (project.hasProperty("googleRepo")) {
|
|
||||||
maven {
|
|
||||||
name "Google"
|
|
||||||
url project.property("googleRepo")
|
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
google() {
|
|
||||||
content {
|
|
||||||
// Improve performance: only check google maven for google deps.
|
|
||||||
includeGroupByRegex RepoMatching.androidx
|
|
||||||
includeGroupByRegex RepoMatching.comAndroid
|
|
||||||
includeGroupByRegex RepoMatching.comGoogle
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (project.hasProperty("centralRepo")) {
|
|
||||||
maven {
|
|
||||||
name "MavenCentral"
|
|
||||||
url project.property("centralRepo")
|
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
mavenCentral() {
|
|
||||||
content {
|
|
||||||
// Improve security: don't search deps with known repos.
|
|
||||||
excludeGroupByRegex RepoMatching.mozilla
|
|
||||||
excludeGroupByRegex RepoMatching.androidx
|
|
||||||
excludeGroupByRegex RepoMatching.comAndroid
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,15 +6,14 @@ apply plugin: 'java-library'
|
|||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
if (project.hasProperty("centralRepo")) {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
maven {
|
maven {
|
||||||
name "MavenCentral"
|
url repository
|
||||||
url project.property("centralRepo")
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -7,15 +7,14 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
if (project.hasProperty("centralRepo")) {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
maven {
|
maven {
|
||||||
name "MavenCentral"
|
url repository
|
||||||
url project.property("centralRepo")
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -3,3 +3,17 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// Prevents gradle builds from looking for a root settings.gradle
|
// Prevents gradle builds from looking for a root settings.gradle
|
||||||
|
pluginManagement {
|
||||||
|
apply from: file('../../../gradle/mozconfig.gradle')
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,15 +7,14 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
if (project.hasProperty("centralRepo")) {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
maven {
|
maven {
|
||||||
name "MavenCentral"
|
url repository
|
||||||
url project.property("centralRepo")
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
allowInsecureProtocol true // Local Nexus in CI uses HTTP
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
|||||||
@@ -3,3 +3,17 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// Prevents gradle builds from looking for a root settings.gradle
|
// Prevents gradle builds from looking for a root settings.gradle
|
||||||
|
pluginManagement {
|
||||||
|
apply from: file('../../../gradle/mozconfig.gradle')
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,6 +3,19 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
|
apply from: file('../gradle/mozconfig.gradle')
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
includeBuild("../android-components/plugins/publicsuffixlist")
|
includeBuild("../android-components/plugins/publicsuffixlist")
|
||||||
includeBuild("../android-components/plugins/dependencies")
|
includeBuild("../android-components/plugins/dependencies")
|
||||||
includeBuild("../android-components/plugins/config")
|
includeBuild("../android-components/plugins/config")
|
||||||
|
|||||||
@@ -5,24 +5,12 @@ import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
if (!System.env.MOZ_AUTOMATION && gradle.mozconfig.substs.MOZ_ARTIFACT_BUILDS) {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
maven {
|
|
||||||
// We will always need this repository for retrieving stable dependencies (like Glean).
|
|
||||||
url "https://maven.mozilla.org/maven2"
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
url "https://nightly.maven.mozilla.org/maven2"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ExtraRepositories.mozillaStaging) {
|
|
||||||
maven {
|
maven {
|
||||||
name "Mozilla Staging"
|
url repository
|
||||||
url "https://maven-default.stage.mozaws.net/maven2"
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -92,23 +80,12 @@ tasks.withType(DetektCreateBaselineTask).configureEach() {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
if (!System.env.MOZ_AUTOMATION && gradle.mozconfig.substs.MOZ_ARTIFACT_BUILDS) {
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
maven {
|
|
||||||
url "https://nightly.maven.mozilla.org/maven2"
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
url "https://maven.mozilla.org/maven2"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ExtraRepositories.mozillaStaging) {
|
|
||||||
maven {
|
maven {
|
||||||
name "Mozilla Staging"
|
url repository
|
||||||
url "https://maven-default.stage.mozaws.net/maven2"
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,14 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
|||||||
@@ -3,3 +3,17 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// Prevents gradle builds from looking for a root settings.gradle
|
// Prevents gradle builds from looking for a root settings.gradle
|
||||||
|
pluginManagement {
|
||||||
|
apply from: file('../../../gradle/mozconfig.gradle')
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,6 +3,19 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
|
apply from: file('../gradle/mozconfig.gradle')
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
includeBuild("../android-components/plugins/publicsuffixlist")
|
includeBuild("../android-components/plugins/publicsuffixlist")
|
||||||
includeBuild("../android-components/plugins/dependencies")
|
includeBuild("../android-components/plugins/dependencies")
|
||||||
includeBuild("../android-components/plugins/config")
|
includeBuild("../android-components/plugins/config")
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ apply from: file('./mach_env.gradle')
|
|||||||
|
|
||||||
logger.lifecycle("mozconfig.gradle> Loading mach environment into a gradle extension property")
|
logger.lifecycle("mozconfig.gradle> Loading mach environment into a gradle extension property")
|
||||||
|
|
||||||
|
if (!ext.hasProperty("topsrcdir")) {
|
||||||
|
ext.topsrcdir = file(buildscript.getSourceFile()).getParentFile().getParentFile().getParentFile().getParentFile().absolutePath
|
||||||
|
}
|
||||||
|
|
||||||
def commandLine = ["${topsrcdir}/mach", "environment", "--format", "json", "--verbose"]
|
def commandLine = ["${topsrcdir}/mach", "environment", "--format", "json", "--verbose"]
|
||||||
if (System.env.GRADLE_MACH_PYTHON) {
|
if (System.env.GRADLE_MACH_PYTHON) {
|
||||||
commandLine.addAll(0, [System.env.GRADLE_MACH_PYTHON])
|
commandLine.addAll(0, [System.env.GRADLE_MACH_PYTHON])
|
||||||
|
|||||||
@@ -5,8 +5,17 @@
|
|||||||
import org.yaml.snakeyaml.Yaml
|
import org.yaml.snakeyaml.Yaml
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
apply from: file('./gradle/mozconfig.gradle')
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -1,4 +1,17 @@
|
|||||||
pluginManagement {
|
pluginManagement {
|
||||||
|
apply from: file('mobile/android/gradle/mozconfig.gradle')
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
|
||||||
|
maven {
|
||||||
|
url repository
|
||||||
|
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/config")
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/config")
|
||||||
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/dependencies")
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/dependencies")
|
||||||
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/publicsuffixlist")
|
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/publicsuffixlist")
|
||||||
|
|||||||
Reference in New Issue
Block a user