Skip to content

Commit 7a860e1

Browse files
committed
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
1 parent 0d3c3c6 commit 7a860e1

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

buildSrc/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ dependencies {
9696
implementation 'io.spring.nohttp:nohttp-gradle:0.0.10'
9797
implementation 'net.sourceforge.htmlunit:htmlunit:2.37.0'
9898
implementation 'org.hidetake:gradle-ssh-plugin:2.10.1'
99-
implementation 'org.jfrog.buildinfo:build-info-extractor-gradle:4.24.20'
99+
implementation 'org.jfrog.buildinfo:build-info-extractor-gradle:4.29.0'
100100
implementation 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1'
101101

102102
testImplementation platform('org.junit:junit-bom:5.8.2')

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package io.spring.gradle.convention
1717

1818
import org.gradle.api.Plugin
1919
import org.gradle.api.Project
20+
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
2021

2122
class ArtifactoryPlugin implements Plugin<Project> {
2223

@@ -36,8 +37,14 @@ class ArtifactoryPlugin implements Plugin<Project> {
3637
password = artifactoryPassword
3738
}
3839
}
39-
defaults {
40-
publications('mavenJava')
40+
}
41+
}
42+
project.plugins.withType(MavenPublishPlugin) {
43+
project.artifactory {
44+
publish {
45+
defaults {
46+
publications('mavenJava')
47+
}
4148
}
4249
}
4350
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class RootProjectPlugin implements Plugin<Project> {
3434
pluginManager.apply(NoHttpPlugin)
3535
pluginManager.apply(SpringNexusPublishPlugin)
3636
pluginManager.apply(CheckProhibitedDependenciesLifecyclePlugin)
37+
pluginManager.apply(ArtifactoryPlugin)
3738
pluginManager.apply("org.sonarqube")
3839

3940
project.repositories.mavenCentral()

0 commit comments

Comments
 (0)