chore: publish to Maven Central - #48
Merged
martinbonnin merged 6 commits intoMar 30, 2026
Merged
Conversation
martinbonnin
added a commit
to GradleUp/librarian
that referenced
this pull request
Mar 29, 2026
Collaborator
|
Thanks for looking into this. Gradle aggregations are a massive pain... I'll dig more tomorrow. |
Collaborator
|
I ended up modifying librarian to explicitely list subprojects. This is not great but I don't think there is another way (see also Kotlin/dokka#4489). Thanks for the nudge on this 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR sets up the project for publication to Maven Central using the Librarian library (fixes #47).
I upgraded Librarian from 0.0.7 to 0.2.1 to use the latest publication API and target Maven Central (see GradleUp/librarian#55).
Following the upgrade, I had to change the Gradle task used to build Dokka documentation as Librarian switched from Dokkatoo to Dokka its 0.2.0 version (GradleUp/librarian#97).
Both
LIBRARIAN_SONATYPE_USERNAMEandLIBRARIAN_SONATYPE_PASSWORDsecrets will probably need to be updated.Important note :
I had to add the Dokka plugin to both
sample-app-androidandsample-app-shareddue to it being applied inside the Librarian plugin. The build fails without it, but in the current state, thesample-app-sharedandsample-app-androiddocumentation are published with the library documentation.I feel like it should not be necessary regarding the comment in the
librarianModuleextension method :I wonder if this has something to do with the
Librarian.rootmethod that seems to configure the Dokka aggregate usingallprojects(without checking whether publication is enabled or not).I'm not confident with the Librarian library, so let me know if I'm mistaken @martinbonnin ! 🙂