Remove artifactory plugin from build

Backport of gh-22490

See gh-26659
This commit is contained in:
Stephane Nicoll
2021-03-10 14:56:15 +01:00
parent c978fb4466
commit 5291c5b233
2 changed files with 12 additions and 4 deletions

View File

@@ -10,7 +10,6 @@ plugins {
id "io.freefair.aspectj" version '4.1.6' apply false
id "com.github.ben-manes.versions" version '0.28.0'
id 'com.gradle.build-scan' version '3.2'
id "com.jfrog.artifactory" version '4.12.0' apply false
}
apply from: "$rootDir/gradle/build-scan-user-data.gradle"

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