-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change pom name #216
change pom name #216
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have an issue with this, but then we should also override the apacheSonatypeArtifactNameProcessor
for this project so that the gRPC
part of the name is consistent.
Otherwise it will be mismatched in gradle versus the rest of the project. You can see https://github.com/mdedetrich/sbt-apache-sonatype/blob/160a1577519f1527644b83831b240fa07ea0b347/src/main/scala/org/mdedetrich/apache/sonatype/ApacheSonatypePlugin.scala#L35-L43 for the default implementation.
@@ -47,7 +47,7 @@ gradlePlugin { | |||
publishing { | |||
publications.withType(MavenPublication) { | |||
pom { | |||
name = "Apache Pekko Grpc Gradle Plugin" | |||
name = "Apache Pekko gRPC Gradle Plugin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the text below is gRPC
, so I +1 for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and it was "pekko-grpc-gradle-plugin"
.
I understand that we don't want to complicate the sbt plugin to cover the case issue but there is no absolute requirement that this gradle-plugin pom needs to match the other poms. |
You can easily add it in this project, just do ThisBuild / apacheSonatypeArtifactNameProcessor := { artifactId =>
val prettified = artifactId
.replaceAll("-", " ")
.replaceAll("_", " ")
.split(" ")
.map(_.capitalize)
.mkString(" ")
.replaceAll("Grpc", "gRPC")
if (prettified.startsWith("Apache ")) prettified else s"Apache $prettified"
} in ThisBuild / apacheSonatypeArtifactNameProcessor := {
apacheSonatypeArtifactNameProcessor.value andThen { prettied => prettied.replaceAll("Grpc", "gRPC") }
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pjfanning I have pushed a commit that also uses fixes this name for the rest of the sbt modules
e56ee2b
to
e0a9692
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
@@ -32,6 +32,11 @@ commands := commands.value.filterNot { command => | |||
|
|||
ThisBuild / reproducibleBuildsCheckResolver := Resolver.ApacheMavenStagingRepo | |||
|
|||
// So that gRPC is properly styled | |||
ThisBuild / apacheSonatypeArtifactNameProcessor := apacheSonatypeArtifactNameProcessor.value.andThen { | |||
_.replaceAll("Grpc", "gRPC") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, but better if it match something like GRPC too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the built plugin title cases the name - so Grpc is what is expected - making this case insensitive is complicated and not worth the hassle
@pjfanning You want to merge this or you still waiting on something? |
merged |
use
gRPC
to match the usual style