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
This commit is contained in:
Brian Clozel 2020-04-28 14:20:54 +02:00
parent e7e230608e
commit be560d7ad5
2 changed files with 12 additions and 4 deletions

View File

@ -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'
}

View File

@ -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"
}
}
}
}