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

fix plugin marker pom not containing name and description #119

Merged
merged 4 commits into from
Feb 23, 2020
Merged

fix plugin marker pom not containing name and description #119

merged 4 commits into from
Feb 23, 2020

Conversation

gabrielittner
Copy link
Collaborator

I found a workaround. Closes #117

@codecov
Copy link

codecov bot commented Feb 23, 2020

Codecov Report

Merging #119 into master will decrease coverage by 0.07%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #119      +/-   ##
============================================
- Coverage     33.93%   33.85%   -0.08%     
  Complexity       51       51              
============================================
  Files            22       22              
  Lines           445      446       +1     
  Branches         73       73              
============================================
  Hits            151      151              
- Misses          264      265       +1     
  Partials         30       30
Impacted Files Coverage Δ Complexity Δ
...vanniktech/maven/publish/MavenPublishConfigurer.kt 0% <0%> (ø) 0 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ef18be...d092494. Read the comment docs.

@@ -148,6 +148,12 @@ internal class MavenPublishConfigurer(
if (it.name == "${plugin.name}PluginMarkerMaven") {
// keep the current group and artifact ids, they are based on the gradle plugin id
configurePom(it, groupId = it.groupId, artifactId = it.artifactId)
// workaround for https://github.com/gradle/gradle/issues/12259
it.pom.withXml { pom ->
pom.asNode().appendNode("name", publishPom.name)
Copy link
Owner

@vanniktech vanniktech Feb 23, 2020

Choose a reason for hiding this comment

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

Is there something like replace or set? That way if Gradle were to fix their bug we won't be having two <name> tags?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍 I've added checks around these. Tested it manually by adding

it.pom.withXml { pom ->
  pom.asNode().appendNode("name", "1")
  pom.asNode().appendNode("description", "2")
}

before which resulted in the tests failing because the pom contained 1 and 2.

@gabrielittner gabrielittner merged commit 590b270 into vanniktech:master Feb 23, 2020
@vanniktech
Copy link
Owner

Awesome, thanks!

@gabrielittner gabrielittner deleted the fix-plugin-marker-pom branch February 23, 2020 13:52
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.

Gradle plugin publishing: POM does not contain name and description
2 participants