2019-03-26 06:18:21 -04:00
|
|
|
if (System.env.ELASTIC_ARTIFACTORY_USERNAME == null || System.env.ELASTIC_ARTIFACTORY_TOKEN == null) {
|
|
|
|
throw new GradleException("Using init script without configuration")
|
|
|
|
} else {
|
|
|
|
logger.info("Using elastic artifactory repos")
|
|
|
|
settingsEvaluated { settings ->
|
|
|
|
settings.pluginManagement {
|
|
|
|
repositories {
|
|
|
|
maven {
|
2019-05-07 06:34:51 -04:00
|
|
|
name "artifactory-gradle-plugins"
|
2019-03-26 06:18:21 -04:00
|
|
|
url "https://artifactory.elstc.co/artifactory/gradle-plugins"
|
|
|
|
credentials {
|
|
|
|
username System.env.ELASTIC_ARTIFACTORY_USERNAME
|
|
|
|
password System.env.ELASTIC_ARTIFACTORY_TOKEN
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gradlePluginPortal()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
projectsLoaded {
|
|
|
|
allprojects {
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
maven {
|
2019-05-07 06:34:51 -04:00
|
|
|
name "artifactory-gradle-release"
|
2019-03-26 06:18:21 -04:00
|
|
|
url "https://artifactory.elstc.co/artifactory/gradle-release/"
|
|
|
|
credentials {
|
|
|
|
username System.env.ELASTIC_ARTIFACTORY_USERNAME
|
|
|
|
password System.env.ELASTIC_ARTIFACTORY_TOKEN
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
repositories {
|
|
|
|
maven {
|
2019-05-07 06:34:51 -04:00
|
|
|
name "artifactory-gradle-release"
|
2019-03-26 06:18:21 -04:00
|
|
|
url "https://artifactory.elstc.co/artifactory/gradle-release/"
|
|
|
|
credentials {
|
|
|
|
username System.env.ELASTIC_ARTIFACTORY_USERNAME
|
|
|
|
password System.env.ELASTIC_ARTIFACTORY_TOKEN
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|