Skip to content

Commit 12ac885

Browse files
authored
[build] publish Gradle plugin to Maven Central (#717)
1 parent a0c80f8 commit 12ac885

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

plugins/graphql-kotlin-gradle-plugin/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# GraphQL Kotlin Gradle Plugin
2-
2+
[![Maven Central](https://img.shields.io/maven-central/v/com.expediagroup/graphql-kotlin-gradle-plugin.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.expediagroup%22%20AND%20a:%22graphql-kotlin-gradle-plugin%22)
3+
[![Javadocs](https://img.shields.io/maven-central/v/com.expediagroup/graphql-kotlin-gradle-plugin.svg?label=javadoc&colorB=brightgreen)](https://www.javadoc.io/doc/com.expediagroup/graphql-kotlin-gradle-plugin)
34
[![Plugin Portal](https://img.shields.io/maven-metadata/v?label=Plugin%20Portal&metadataUrl=https%3A%2F%2Fplugins.gradle.org%2Fm2%2Fcom%2Fexpediagroup%2Fgraphql-kotlin-gradle-plugin%2Fmaven-metadata.xml)](https://plugins.gradle.org/plugin/com.expediagroup.graphql)
45

56
GraphQL gradle plugin provides functionality to introspect GraphQL schemas and generate a lightweight GraphQL HTTP client.

plugins/graphql-kotlin-gradle-plugin/build.gradle.kts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,18 @@ tasks {
4545
System.setProperty("gradle.publish.secret", System.getenv("PLUGIN_PORTAL_SECRET"))
4646
}
4747
}
48-
withType<PublishToMavenRepository> {
49-
// explicitly disable maven-publish tasks - task will be listed but will be disabled
50-
enabled = false
48+
publishing {
49+
publications {
50+
afterEvaluate {
51+
named<MavenPublication>("graphQLPluginPluginMarkerMaven") {
52+
// update auto-generated pom.xml for plugin marker with required information
53+
pom {
54+
name.set(artifactId)
55+
description.set("Plugin descriptor for GraphQL Kotlin Gradle plugin")
56+
}
57+
}
58+
}
59+
}
5160
}
5261
test {
5362
systemProperty("graphQLKotlinVersion", project.version)

0 commit comments

Comments
 (0)