Skip to content

Update maven publishing plugin and switch to using a convention - #574

Open
escardin wants to merge 3 commits into
cashapp:masterfrom
navsmb:lovelace/ConventionForMavenPublishing
Open

Update maven publishing plugin and switch to using a convention#574
escardin wants to merge 3 commits into
cashapp:masterfrom
navsmb:lovelace/ConventionForMavenPublishing

Conversation

@escardin

Copy link
Copy Markdown
Contributor

Should be a lot easer to work with and make changes to now, as we don't need to deal with things being applied indiscriminately to the project.

This is based on top of the dokka branch as it relies on some of what was done there to work.

I did this anticipating it would solve some issues with how we publish the service, but in the end it wasn't strictly necessary. I still prefer it, and it's more gradle-y.

Comment thread bom/build.gradle.kts
constraints {
project.rootProject.subprojects.forEach { subproject ->
if (subproject.name != "bom") {
if (subproject.name !in listOf("bom", "client-sqldelight-test")) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm adding an exclusion here because we don't actually publish the test jar (and shouldn't be). This makes the pom more accurate

@@ -0,0 +1,14 @@
import com.vanniktech.maven.publish.JavadocJar

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a separate convention because the bom subproject can't have the kotlin plugin configured even with apply(false). It makes things clearer, even if somewhat less explicit than copying the same block everywhere.

mavenPublishing {

configure(
KotlinJvm(javadocJar = JavadocJar.Dokka("dokkaGeneratePublicationMarkdown"))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the correct target to use when pulling docs with dokka 2.x and it got missed before.

Comment thread docs/build.gradle.kts
Comment on lines +7 to +10
project.rootProject.subprojects.forEach { subproject ->
if (subproject.name !in listOf("client-sqldelight-test"))
dokka(subproject)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I saw this used in the bom subproject and I liked that it'd save folks effort if adding more subprojects to keep the docs working well.

Comment thread deploy_website.sh
Comment on lines +24 to +25
GRADLE_TASKS=$(ls -d misk*/ | cut -f1 -d'/' | awk '{ printf ":%s:dokkaGenerateMarkdown ", $1 }')
gradle dokkaGenerateMarkdown

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess this got missed in the dokka pr...

escardin added 2 commits May 28, 2026 15:11
It's not any worse than what exists, but at least it's not complaining anymore. I think some small tweaks could get it all the way to working.
It's not any worse than what exists, but at least it's not complaining anymore. I think some small tweaks could get it all the way to working.
@escardin
escardin force-pushed the lovelace/ConventionForMavenPublishing branch from 8ac4876 to fc47896 Compare May 28, 2026 19:39
Should be a lot easer to work with and make changes to now, as we don't need to deal with things being applied indiscriminately to the project
@escardin
escardin force-pushed the lovelace/ConventionForMavenPublishing branch from fc47896 to 2c810ed Compare May 28, 2026 19:48
@adrw

adrw commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

A little bit hesitant to land this since it means Backfila drifts from the publishing patterns of other Block OSS repos / Misk which makes maintenance a bit more difficult. Seems like a reasonable change but want to think about it a bit more.

@escardin

escardin commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

A little bit hesitant to land this since it means Backfila drifts from the publishing patterns of other Block OSS repos / Misk which makes maintenance a bit more difficult. Seems like a reasonable change but want to think about it a bit more.

Yeah. I'm okay with either not landing it, or doing at least the same thing for misk if that's reasonable?

I didn't end up needing it for what I was trying to accomplish (fixing publishing the unshaded jar), so it can be closed or deferred.

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.

2 participants