Skip to content

Commit

Permalink
dont publish from mavenJava for gradle plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Ski committed Aug 15, 2024
1 parent 9c7955a commit 14a01fb
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@ subprojects
}
}
}
mavenJava(MavenPublication) {
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
//Check if we are a gradle plugin, if we are skip mavenJava
if (!plugins.hasPlugin('java-gradle-plugin')) {
mavenJava(MavenPublication) {

from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
Expand Down

0 comments on commit 14a01fb

Please sign in to comment.