From 86c734785dcf977f02b72a7f6927b2ef7d9f8c2b Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Wed, 21 Aug 2019 20:15:35 +0200 Subject: [PATCH] Apply Artifactory Gradle plugin Instead of relying on the CI server to apply and configure this plugin, this commit does it directly in the Spring Framework build. This allows us to take full control over which projects are published and how. See gh-23282 --- build.gradle | 1 + gradle/publications.gradle | 5 +++++ gradle/spring-module.gradle | 2 -- integration-tests/integration-tests.gradle | 5 ----- spring-core/kotlin-coroutines/kotlin-coroutines.gradle | 5 ----- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 8d25f463b5f..9d2fcc9c8fc 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,7 @@ plugins { id 'org.asciidoctor.convert' version '1.5.8' id 'io.spring.nohttp' version '0.0.3.RELEASE' id 'de.undercouch.download' version '4.0.0' + id "com.jfrog.artifactory" version '4.9.8' apply false } ext { diff --git a/gradle/publications.gradle b/gradle/publications.gradle index 5fa9eb69087..bc4cb25000b 100644 --- a/gradle/publications.gradle +++ b/gradle/publications.gradle @@ -1,4 +1,5 @@ apply plugin: "maven-publish" +apply plugin: 'com.jfrog.artifactory' publishing { publications { @@ -37,4 +38,8 @@ publishing { } } } +} + +artifactoryPublish { + publications(publishing.publications.mavenJava) } \ No newline at end of file diff --git a/gradle/spring-module.gradle b/gradle/spring-module.gradle index aabccea8293..486a3c38f1b 100644 --- a/gradle/spring-module.gradle +++ b/gradle/spring-module.gradle @@ -56,5 +56,3 @@ publishing { } } } - - diff --git a/integration-tests/integration-tests.gradle b/integration-tests/integration-tests.gradle index 1043c60a09c..f87ae402615 100644 --- a/integration-tests/integration-tests.gradle +++ b/integration-tests/integration-tests.gradle @@ -20,8 +20,3 @@ dependencies { testCompile("org.hsqldb:hsqldb:${hsqldbVersion}") testCompile("org.hibernate:hibernate-core:5.1.17.Final") } - -// Avoid publishing JAR to the artifact repository -if (pluginManager.hasPlugin("com.jfrog.artifactory")) { - artifactoryPublish.skip = true -} diff --git a/spring-core/kotlin-coroutines/kotlin-coroutines.gradle b/spring-core/kotlin-coroutines/kotlin-coroutines.gradle index 0eadb3e08dc..b7f5524603b 100644 --- a/spring-core/kotlin-coroutines/kotlin-coroutines.gradle +++ b/spring-core/kotlin-coroutines/kotlin-coroutines.gradle @@ -10,11 +10,6 @@ dependencies { compile("org.jetbrains.kotlinx:kotlinx-coroutines-reactor") } -// Avoid publishing JAR to the artifact repository -if (pluginManager.hasPlugin("com.jfrog.artifactory")) { - artifactoryPublish.skip = true -} - eclipse { project { buildCommand "org.jetbrains.kotlin.ui.kotlinBuilder"