Skip to content

Commit 066d524

Browse files
committed
Change artifact publish
- Now always publishing to artifactory(to get api docs). - Release publishes to central(no docs publishing as we don't want zip files there.
1 parent 84e0200 commit 066d524

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

buildSrc/src/main/java/org/springframework/security/kerberos/gradle/PublishArtifactsPlugin.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,16 @@ public void execute(Task publishArtifacts) {
3030
publishArtifacts.setGroup("Publishing");
3131
publishArtifacts.setDescription("Publish the artifacts to either Artifactory or Maven Central based on the version");
3232
if (Utils.isRelease(project)) {
33-
publishArtifacts.dependsOn("publishToOssrh");
34-
}
35-
else {
36-
publishArtifacts.dependsOn("artifactoryPublish");
33+
// Don't depend on publishDocsPublicationToOssrhRepository as we don't
34+
// want dist zip for api docs on central
35+
Task publishOssrh = project.getTasks().findByName("publishMavenJavaPublicationToOssrhRepository");
36+
if (publishOssrh != null) {
37+
publishArtifacts.dependsOn(publishOssrh);
38+
}
3739
}
40+
// publishArtifacts.dependsOn("publishMavenJavaPublicationToOssrhRepository");
41+
// always publish to artifactory as we need apidocs via autorepo
42+
publishArtifacts.dependsOn("artifactoryPublish");
3843
}
3944
});
4045
}

0 commit comments

Comments
 (0)