Skip to content

Commit

Permalink
fix(bug): description field in pom.xml was not populated
Browse files Browse the repository at this point in the history
**Description**:

The `<description></description>` field was not present in the pom.xml
file generated for maven central. Needed to update two parts of the
field setter:

- `.orElse(provider { project.description })` became
  `.orElse(provider(project::getDescription))` to actually populate with
  the project description
- `.orNull()` becomes `.orElse("")` to prevent a null entry on
  description if it is not present in the other ways

**Related Issue(s)**:

Fixes #16624

Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
  • Loading branch information
rbarkerSL committed Nov 15, 2024
1 parent eb8b444 commit b7dc4bb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ val maven =
url = "https://www.hashgraph.com/"
inceptionYear = "2016"

// this field must be present. Default to empty string.
description =
providers
.fileContents(layout.projectDirectory.file("../description.txt"))
.asText
.orElse(provider { project.description })
.orElse(provider(project::getDescription))
.map { it.replace("\n", " ").trim() }
.orNull
.orElse("")

organization {
name = "Hedera Hashgraph, LLC"
Expand Down

0 comments on commit b7dc4bb

Please sign in to comment.