Skip to content

Conversation

@shanshin
Copy link
Collaborator

@shanshin shanshin commented Jun 7, 2024

The new DSL will allow to write chains like kover.reports.total { ... } instead of kover { reports { total { ... } } }.

However, the DomainObjectContainer for variants has not been implemented, because it will be necessary to rework the workflow with different types of variants, which is part of a larger reworking of the DSL.

Resolves #600

@shanshin shanshin requested a review from sandwwraith June 7, 2024 10:36
/**
* Instance to configuring of report variants shared by the current project.
*
* See details in [currentProject].
Copy link
Member

Choose a reason for hiding this comment

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

Since KDoc doesn't have any syntax for overloads, I'm afraid that [currentProject] will link recursively to this property again (it doesn't do this in IDEA currently, but who knows). Maybe just say See details in [currentProject] function or See details in [KoverCurrentProjectVariantsConfig]?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In dokka when you click on the currentProject property, the function opens %)

So, it seems to me that this postscript is more for the IDE.

internal var instrumentationAction: Action<KoverMergingInstrumentation>? = null
internal val variantsAction: MutableMap<String, Action<KoverMergingVariantCreate>> = mutableMapOf()

internal var configured: Boolean = false
Copy link
Member

Choose a reason for hiding this comment

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

I think some test is needed for this new boolean property, with e.g., kover.merge.subprojects() in configuration

Copy link
Collaborator Author

@shanshin shanshin Jun 7, 2024

Choose a reason for hiding this comment

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

It's already tested, see tests in MergingTests, e.g. testRootNoProjects (error should be thrown)

Copy link
Member

Choose a reason for hiding this comment

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

I mean you need to test that syntax kover.merge.subprojects works the same as kover { merge { subprojects() } }

The new DSL will allow to write chains like `kover.reports.total { ... }` instead of `kover { reports { total { ... } } }`.

However, the DomainObjectContainer for variants has not been implemented, because it will be necessary to rework the workflow with different types of variants, which is part of a larger reworking of the DSL.

Resolves #600
@shanshin shanshin merged commit 0f5de01 into main Jun 7, 2024
@shanshin shanshin deleted the dsl-instances branch June 7, 2024 16:19
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.

Improve DSL by leveraging Gradle managed objects

3 participants