Skip to content
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

Merged
merged 2 commits into from
Jan 25, 2024
Merged

change pom name #216

merged 2 commits into from
Jan 25, 2024

Conversation

pjfanning
Copy link
Contributor

use gRPC to match the usual style

Copy link
Contributor

@mdedetrich mdedetrich left a 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"
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
and the Logo is GRPC :)! maybe it's fine. will this name cause any trademark issue?

Copy link
Member

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".

@pjfanning
Copy link
Contributor Author

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.

@mdedetrich
Copy link
Contributor

mdedetrich commented Jan 24, 2024

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 build.sbt. Thats why the setting is configurable. Or an even simpler variant is

ThisBuild / apacheSonatypeArtifactNameProcessor := {
  apacheSonatypeArtifactNameProcessor.value andThen { prettied => prettied.replaceAll("Grpc", "gRPC") }
}

Copy link
Contributor

@mdedetrich mdedetrich left a 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

@mdedetrich mdedetrich force-pushed the grpc-gradle-pom-name branch from e56ee2b to e0a9692 Compare January 24, 2024 22:19
Copy link
Member

@He-Pin He-Pin left a 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")
Copy link
Member

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.

Copy link
Contributor Author

@pjfanning pjfanning Jan 24, 2024

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

@mdedetrich
Copy link
Contributor

@pjfanning You want to merge this or you still waiting on something?

@pjfanning pjfanning merged commit d93af28 into apache:main Jan 25, 2024
16 checks passed
@pjfanning
Copy link
Contributor Author

merged

@pjfanning pjfanning deleted the grpc-gradle-pom-name branch January 25, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants