Commit 81103b8e authored by brizental's avatar brizental
Browse files

Allow users to define a custom gradle depencies location

parent 8c308e1d
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -15,6 +15,17 @@ buildscript {
    }

    repositories {
        def customRepoUrl = project.findProperty("gradleDependenciesUrl")
        if (customRepoUrl) {
            maven {
                url customRepoUrl
                metadataSources {
                    gradleMetadata()
                    mavenPom()
                }
            }
        }

        mavenCentral()
        google()
        maven {
@@ -60,6 +71,17 @@ plugins {

allprojects {
    repositories {
        def customRepoUrl = project.findProperty("gradleDependenciesUrl")
        if (customRepoUrl) {
            maven {
                url customRepoUrl
                metadataSources {
                    gradleMetadata()
                    mavenPom()
                }
            }
        }

        google()
        mavenCentral()
        maven {
+27 −0
Original line number Diff line number Diff line
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

pluginManagement {
    repositories {
        def customRepoUrl = settings.hasProperty("gradleDependenciesUrl") ? settings.gradleDependenciesUrl : null
        if (customRepoUrl) {
            maven {
                url customRepoUrl
                metadataSources {
                    gradleMetadata()
                    mavenPom()
                }
            }
        }
    }
}

import org.yaml.snakeyaml.Yaml

// We prefer `appServicesRootDir` over `rootDir` to help us on the path to the monorepo.
@@ -15,6 +31,17 @@ buildscript {
    if (!gradle.root.hasProperty("mozconfig")) {
        // in app-services
        repositories {
            def customRepoUrl = settings.hasProperty("gradleDependenciesUrl") ? settings.gradleDependenciesUrl : null
            if (customRepoUrl) {
                maven {
                    url customRepoUrl
                    metadataSources {
                        gradleMetadata()
                        mavenPom()
                    }
                }
            }

            mavenCentral()
        }
    } else {