Merge branch '6.0.x' into 6.1.x
This commit is contained in:
commit
7aa6e0d787
|
@ -21,6 +21,10 @@ import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
|
||||||
|
|
||||||
class ArtifactoryPlugin implements Plugin<Project> {
|
class ArtifactoryPlugin implements Plugin<Project> {
|
||||||
|
|
||||||
|
private static final String ARTIFACTORY_URL_NAME = "ARTIFACTORY_URL"
|
||||||
|
|
||||||
|
private static final String DEFAULT_ARTIFACTORY_URL = "https://repo.spring.io"
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void apply(Project project) {
|
void apply(Project project) {
|
||||||
project.plugins.apply('com.jfrog.artifactory')
|
project.plugins.apply('com.jfrog.artifactory')
|
||||||
|
@ -28,7 +32,7 @@ class ArtifactoryPlugin implements Plugin<Project> {
|
||||||
boolean isSnapshot = Utils.isSnapshot(project);
|
boolean isSnapshot = Utils.isSnapshot(project);
|
||||||
boolean isMilestone = Utils.isMilestone(project);
|
boolean isMilestone = Utils.isMilestone(project);
|
||||||
project.artifactory {
|
project.artifactory {
|
||||||
contextUrl = 'https://repo.spring.io'
|
contextUrl = System.getenv().getOrDefault(ARTIFACTORY_URL_NAME, DEFAULT_ARTIFACTORY_URL)
|
||||||
publish {
|
publish {
|
||||||
repository {
|
repository {
|
||||||
repoKey = isSnapshot ? 'libs-snapshot-local' : isMilestone ? 'libs-milestone-local' : 'libs-release-local'
|
repoKey = isSnapshot ? 'libs-snapshot-local' : isMilestone ? 'libs-milestone-local' : 'libs-release-local'
|
||||||
|
|
Loading…
Reference in New Issue