ArtifactoryPlugin only apply default publications for MavenPublishPlugin

Issue gh-10602
This commit is contained in:
Rob Winch 2022-07-25 13:42:06 -05:00
parent e3ed6b3539
commit 8aa6fbfed2
1 changed files with 9 additions and 2 deletions

View File

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