Skip to content

Commit 6187263

Browse files
committed
Enable artifactoryPublish only if maven-publish plugin
1 parent cc6eaf1 commit 6187263

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

utils/spring-artifactory-init.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ allprojects {
1616
apply plugin: 'signing'
1717

1818
tasks.register('artifactoryPublish', org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask) {
19+
enabled(false)
1920
setCiServerBuild()
2021
}
2122

@@ -60,9 +61,13 @@ allprojects {
6061
clientConfig.insecureTls = false
6162
}
6263

63-
if (!ossrhUrl && gpgPassphrase && gpgPrivateKey) {
64-
afterEvaluate {
65-
pluginManager.withPlugin('maven-publish') {
64+
65+
afterEvaluate {
66+
pluginManager.withPlugin('maven-publish') {
67+
tasks.named('artifactoryPublish') {
68+
enabled(true)
69+
}
70+
if (!ossrhUrl && gpgPassphrase && gpgPrivateKey) {
6671
signing {
6772
useInMemoryPgpKeys(gpgPrivateKey, gpgPassphrase)
6873
sign publishing.publications.mavenJava

0 commit comments

Comments
 (0)