From 79d632fd012706358e10e3e230dd54b473a9524e Mon Sep 17 00:00:00 2001 From: "R. C. Howell" Date: Thu, 18 Aug 2022 14:22:38 -0700 Subject: [PATCH] Fixes POM name and description (#137) --- buildSrc/src/main/kotlin/pig.publish.gradle.kts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/pig.publish.gradle.kts b/buildSrc/src/main/kotlin/pig.publish.gradle.kts index ec1a435..6d81e32 100644 --- a/buildSrc/src/main/kotlin/pig.publish.gradle.kts +++ b/buildSrc/src/main/kotlin/pig.publish.gradle.kts @@ -30,14 +30,24 @@ java { withSourcesJar() } +fun String.mavenName(): String = when (this) { + "pig-runtime" -> "PartiQL I.R. Generator (a.k.a P.I.G.) Runtime Library" + else -> "PartiQL I.R. Generator (a.k.a P.I.G.)" +} + +fun String.artifactId(): String = name.replace("pig", "partiql-ir-generator") + publishing { publications { create(name) { - artifactId = name.replace("pig", "partiql-ir-generator") + val module = name + artifactId = module.artifactId() from(components["java"]) pom { url.set("https://partiql.org/") packaging = "jar" + name.set(module.mavenName()) + description.set("The P.I.G. is a code generator for domain models such ASTs and execution plans.") scm { connection.set("scm:git@github.com:partiql/partiql-ir-generator.git") developerConnection.set("scm:git@github.com:partiql/partiql-ir-generator.git")