Browse Source

Fix Snapshot Sources/Javadoc

This commit merges a workaround to an issue in JFrog's Gradle plugin
which causes SNAPSHOT javadoc and sources to become out of sync and thus
prevents users from being able to download either.

Closes gh-10602
pull/11736/head
Rob Winch 3 years ago
parent
commit
7a860e1568
  1. 2
      buildSrc/build.gradle
  2. 11
      buildSrc/src/main/groovy/io/spring/gradle/convention/ArtifactoryPlugin.groovy
  3. 1
      buildSrc/src/main/groovy/io/spring/gradle/convention/RootProjectPlugin.groovy

2
buildSrc/build.gradle

@ -96,7 +96,7 @@ dependencies {
implementation 'io.spring.nohttp:nohttp-gradle:0.0.10' implementation 'io.spring.nohttp:nohttp-gradle:0.0.10'
implementation 'net.sourceforge.htmlunit:htmlunit:2.37.0' implementation 'net.sourceforge.htmlunit:htmlunit:2.37.0'
implementation 'org.hidetake:gradle-ssh-plugin:2.10.1' implementation 'org.hidetake:gradle-ssh-plugin:2.10.1'
implementation 'org.jfrog.buildinfo:build-info-extractor-gradle:4.24.20' implementation 'org.jfrog.buildinfo:build-info-extractor-gradle:4.29.0'
implementation 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1' implementation 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1'
testImplementation platform('org.junit:junit-bom:5.8.2') testImplementation platform('org.junit:junit-bom:5.8.2')

11
buildSrc/src/main/groovy/io/spring/gradle/convention/ArtifactoryPlugin.groovy

@ -17,6 +17,7 @@ package io.spring.gradle.convention
import org.gradle.api.Plugin import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
class ArtifactoryPlugin implements Plugin<Project> { class ArtifactoryPlugin implements Plugin<Project> {
@ -36,8 +37,14 @@ class ArtifactoryPlugin implements Plugin<Project> {
password = artifactoryPassword password = artifactoryPassword
} }
} }
defaults { }
publications('mavenJava') }
project.plugins.withType(MavenPublishPlugin) {
project.artifactory {
publish {
defaults {
publications('mavenJava')
}
} }
} }
} }

1
buildSrc/src/main/groovy/io/spring/gradle/convention/RootProjectPlugin.groovy

@ -34,6 +34,7 @@ class RootProjectPlugin implements Plugin<Project> {
pluginManager.apply(NoHttpPlugin) pluginManager.apply(NoHttpPlugin)
pluginManager.apply(SpringNexusPublishPlugin) pluginManager.apply(SpringNexusPublishPlugin)
pluginManager.apply(CheckProhibitedDependenciesLifecyclePlugin) pluginManager.apply(CheckProhibitedDependenciesLifecyclePlugin)
pluginManager.apply(ArtifactoryPlugin)
pluginManager.apply("org.sonarqube") pluginManager.apply("org.sonarqube")
project.repositories.mavenCentral() project.repositories.mavenCentral()

Loading…
Cancel
Save