-
Notifications
You must be signed in to change notification settings - Fork 682
Create BuildService for collecting dependencies for kotest-bom #4074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
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
|
Is this ready to be merged ? |
|
yes |
sksamuel
approved these changes
Jul 21, 2024
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.
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
rootProjectandsubprojects). 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 thekotest-publishing-conventionsconvention 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 = falsein theirbuild.gradle.kts.kotest-bomis excluded by default.Depends on