Automated g4 rollback of changelist 233778270

*** Reason for rollback ***

Breaks the build.

*** Original change description ***

Fix overrides of plugin repository

The correct way to override the plugins repo is through the pluginManagement
section in the gradle settings file.  Also make use of the gradle.properties
file to initialize repositoryUrl and also publishUrl so we don't have to mess
around with finding and assigning them in the main gradle file.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233801411
This commit is contained in:
mcilwain 2019-02-13 12:01:04 -08:00 committed by jianglai
parent 287824564c
commit 4f9bce1686
3 changed files with 18 additions and 19 deletions

View file

@ -1,4 +1,18 @@
buildscript {
ext.repositoryUrl = project.findProperty('repositoryUrl')
ext.publishUrl = project.findProperty('publishUrl')
repositories {
if (repositoryUrl == null) {
println "Using Maven central..."
mavenCentral()
} else {
maven {
println "Using GCS Maven repo..."
url repositoryUrl
}
}
}
// Lock buildscript dependencies.
configurations.classpath {
resolutionStrategy.activateDependencyLocking()
@ -57,7 +71,7 @@ task stage {
}
if (publishUrl) {
if (publishUrl != null) {
publishing {
repositories {
maven {
@ -115,12 +129,12 @@ allprojects {
if (project.name == 'services') return
repositories {
if (rootProject.repositoryUrl) {
if (rootProject.repositoryUrl == null) {
mavenCentral()
} else {
maven {
url rootProject.repositoryUrl
}
} else {
mavenCentral()
}
}

View file

@ -1,2 +0,0 @@
repositoryUrl=
publishUrl=

View file

@ -1,16 +1,3 @@
if (repositoryUrl) {
println "Using repository $repositoryUrl for plugins"
pluginManagement {
repositories {
maven {
url repositoryUrl
}
}
}
} else {
println "Using default repository for plugins"
}
rootProject.name = 'nomulus'
include 'core'