Update maven publishing plugin and switch to using a convention - #574
Update maven publishing plugin and switch to using a convention#574escardin wants to merge 3 commits into
Conversation
| constraints { | ||
| project.rootProject.subprojects.forEach { subproject -> | ||
| if (subproject.name != "bom") { | ||
| if (subproject.name !in listOf("bom", "client-sqldelight-test")) { |
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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")) |
There was a problem hiding this comment.
This is the correct target to use when pulling docs with dokka 2.x and it got missed before.
| project.rootProject.subprojects.forEach { subproject -> | ||
| if (subproject.name !in listOf("client-sqldelight-test")) | ||
| dokka(subproject) | ||
| } |
There was a problem hiding this comment.
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.
| GRADLE_TASKS=$(ls -d misk*/ | cut -f1 -d'/' | awk '{ printf ":%s:dokkaGenerateMarkdown ", $1 }') | ||
| gradle dokkaGenerateMarkdown |
There was a problem hiding this comment.
I guess this got missed in the dokka pr...
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.
8ac4876 to
fc47896
Compare
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
fc47896 to
2c810ed
Compare
|
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. |
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.