Skip to content

Commit aa0090f

Browse files
authored
[build] attempt to use default mavenJava publication for plugin (#735)
Our current build does not upload Gradle plugin jar artifact to Sonatype. Reverting back to the original publication logic - originally had an issue with mutliple artifacts sharing the coordinates, checking if that is still an issue. If nothing else works we might need to disable Sonatype publish of Gradle artifact for now.
1 parent 9a20c04 commit aa0090f

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

build.gradle.kts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ subprojects {
124124
}
125125
publishing {
126126
publications {
127-
withType<MavenPublication> {
127+
create<MavenPublication>("mavenJava") {
128128
pom {
129129
name.set("${currentProject.group}:${currentProject.name}")
130130
url.set("https://github.com/ExpediaGroup/graphql-kotlin")
@@ -158,20 +158,14 @@ subprojects {
158158
mavenPom.description.set(currentProject.description)
159159
}
160160
}
161+
162+
from(jarComponent)
161163
// no need to publish sources or javadocs for SNAPSHOT builds
162-
// do not attach sources/javadoc to the Gradle plugin marker
163-
if (rootProject.extra["isReleaseVersion"] as Boolean && name != "graphQLPluginPluginMarkerMaven") {
164+
if (rootProject.extra["isReleaseVersion"] as Boolean) {
164165
artifact(sourcesJar.get())
165166
artifact(javadocJar.get())
166167
}
167168
}
168-
169-
// workaround for java-gradle-plugin creating separate hardcoded pluginMaven publication
170-
if (currentProject.name != "graphql-kotlin-gradle-plugin") {
171-
create<MavenPublication>("mavenJava") {
172-
from(jarComponent)
173-
}
174-
}
175169
}
176170
}
177171
signing {

0 commit comments

Comments
 (0)