Skip to content

Conversation

aSemy
Copy link
Contributor

@aSemy aSemy commented Jun 8, 2024

Create a custom BuildService to collect subprojects that should be included in the kotest-bom.

This change is needed because currently the Kotest BOM entries are discovered by using discouraged Gradle methods (specifically, accessing the state of other subprojects via rootProject and subprojects). Gradle is planning to make this invalid - see Isolated Projects.

Instead of reading other subprojects using rootProject.subprojects, the KotestBomService is used to share state. It will automatically collect the dependencies from any project that has the kotest-publishing-conventions convention plugin. This means that the kotest-bom subproject doesn't need to query the internal state of other subprojects.

Subprojects can opt out of being included in the BOM by setting includeInKotestBom = false in their build.gradle.kts. kotest-bom is excluded by default.

Depends on

aSemy added 9 commits June 8, 2024 13:54
Instead of editing the POM in-memory, instead modify the POM file that the `generatePomFileForKotlinMultiplatformPublication` task produces.

Replace the Groovy XML utils with W3C Document classes, because the Groovy XML utils don't preserve comments.
- update publishing-convention to only adds a Javadoc JAR for KMP subprojects
- remove duplicated configuration in kotest-bom
Replaces manual project filtering in kotest-bom with KotestBomService, which will automatically collect the dependencies from any project that has the `kotest-publishing-conventions` convention plugin. This focuses the logic of what should be added into a convention plugin.

Subprojects can opt out of being included in the BOM by setting `includeInKotestBom = false`. `kotest-bom` is excluded by default.
# Conflicts:
#	kotest-bom/build.gradle.kts
@Kantis Kantis added the builds 🐘 PRs / Issues related to the CI/CD pipelines or Gradle builds label Jun 24, 2024
@sksamuel
Copy link
Member

Is this ready to be merged ?

@aSemy aSemy marked this pull request as ready for review July 21, 2024 00:04
@aSemy
Copy link
Contributor Author

aSemy commented Jul 21, 2024

yes

@aSemy aSemy enabled auto-merge July 21, 2024 00:04
@aSemy aSemy added this pull request to the merge queue Jul 21, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 21, 2024
@sksamuel sksamuel enabled auto-merge July 21, 2024 05:09
@sksamuel sksamuel added this pull request to the merge queue Jul 21, 2024
Merged via the queue into kotest:master with commit 5206d44 Jul 21, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds 🐘 PRs / Issues related to the CI/CD pipelines or Gradle builds
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants