Add specific Maven artifact descriptions for all subprojects#16
Add specific Maven artifact descriptions for all subprojects#16bastianeicher merged 1 commit intomainfrom
Conversation
bastianeicher
left a comment
There was a problem hiding this comment.
Please move the description for the typedest project from build.gradle.kts to typedrest/build.gradle.kts too.
Done in commit 4f3284c. The description for the |
bastianeicher
left a comment
There was a problem hiding this comment.
Can this be made tidier, by just setting description for each project and then calling description.set(project.description) in the pom section of the top-level build.gradle.kts?
Done in commit 3a922e9. Each subproject now sets its |
| pom { | ||
| name.set(project.name) | ||
| description.set("TypedRest helps you build type-safe, fluent-style REST API clients.") | ||
| description.set(provider { project.description }) |
There was a problem hiding this comment.
@copilot Would this also work?
| description.set(provider { project.description }) | |
| description.set(project.description) |
There was a problem hiding this comment.
Unfortunately no. Without the provider { } wrapper, project.description evaluates to null at configuration time (before the subproject's build file sets it), resulting in empty description fields in the generated POMs. The provider { } defers evaluation until the value is actually needed, ensuring the description set in each subproject's build file is available.
ea592d9 to
5e25cd0
Compare
5e25cd0 to
16cdad1
Compare
All three Gradle subprojects were publishing with the same generic description defined in the root build file. Each subproject now defines its own specific description using the standard Gradle
descriptionproperty.Changes
Each subproject's
build.gradle.ktsnow sets thedescriptionproperty:description = "TypedRest helps you build type-safe, fluent-style REST API clients."description = "Adds support for serializing using Jackson (https://github.com/FasterXML/jackson) instead of kotlinx.serialization."description = "Adds support for serializing using Moshi (https://github.com/square/moshi) instead of kotlinx.serialization."The root
build.gradle.ktsreferences these descriptions in the POM configuration usingprovider { project.description }, which consolidates the publishing configuration in one place while keeping each subproject's description locally defined.This approach results in cleaner, more maintainable code with all publishing logic centralized in the root build file.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.