From be560d7ad5883dc906c18b17a565857904429ff1 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Tue, 28 Apr 2020 14:20:54 +0200 Subject: [PATCH] Remove artifactory plugin from build As we're moving the build to Concourse CI, we don't need to use the Artifactory plugin anymore. Our build will publish the artifacts to a repository on the local filesystem and will push its content to Artifactory with the spring-io/artifactory-resource. This commit also adds the conditional configuration for publishing to a local repository. See gh-22490 --- build.gradle | 1 - gradle/publications.gradle | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 6205e8aaab..88cdc51360 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,6 @@ plugins { id 'io.spring.nohttp' version '0.0.4.RELEASE' id 'de.undercouch.download' version '4.0.0' id 'com.gradle.build-scan' version '3.2' - id "com.jfrog.artifactory" version '4.12.0' apply false id "io.freefair.aspectj" version '4.1.1' apply false id "com.github.ben-manes.versions" version '0.24.0' } diff --git a/gradle/publications.gradle b/gradle/publications.gradle index 97d6e51f05..86e0d2221c 100644 --- a/gradle/publications.gradle +++ b/gradle/publications.gradle @@ -1,5 +1,4 @@ apply plugin: "maven-publish" -apply plugin: 'com.jfrog.artifactory' publishing { publications { @@ -50,6 +49,16 @@ publishing { } } -artifactoryPublish { - publications(publishing.publications.mavenJava) +configureDeploymentRepository(project) + +void configureDeploymentRepository(Project project) { + project.plugins.withType(MavenPublishPlugin.class).all { + PublishingExtension publishing = project.getExtensions().getByType(PublishingExtension.class); + if (project.hasProperty("deploymentRepository")) { + publishing.repositories.maven { + it.url = project.property("deploymentRepository") + it.name = "deployment" + } + } + } } \ No newline at end of file