Skip to content
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

Add the ability to create custom report variants #463

Closed
shanshin opened this issue Sep 20, 2023 · 2 comments
Closed

Add the ability to create custom report variants #463

shanshin opened this issue Sep 20, 2023 · 2 comments
Assignees
Labels
Feature Feature request issue type Kover DSL Kover Gradle Plugin S: ready for release Status: merged in the main branch

Comments

@shanshin
Copy link
Collaborator

shanshin commented Sep 20, 2023

Motivation

  • it is necessary to generate reports for classes located in the same project and related to the JVM target and several specific android build variants
  • it is necessary to generate merged reports on classes from different subprojects of the same build, while some of these subprojects contain JVM classes, other classes from different Android build variants
  • reports should be generated for classes in such combinations that must be defined by the user himself

Terminology

Report variant - named set of sources and tests grouped by certain conditions: JVM target, Android build variant, their commbination, etc.). It is acceptable to generate reports for each variant.

Solution

A special DSL will be added to create custom report variant that can be filled with classes from JVM target, Android build variants and other custom variants:

// configure report variants (creating custom variants and exports it)
koverVariants {
    // create custom reports variant
    create("customVariantName") {
        // add android or custom report variants
        add("jvm", "apiRelease", "appRelease", "libRelease")

        // flexibly add android variants
        addAndroid(buildType = "release", "api", "app", "lib") // for Android build variants `apiRelease`, `appRelease`, `libRelease`
        // also
        addAndroid(buildType = "release", "*") // for Android build variants `release`, `apiRelease`, `appRelease`, `libRelease`
    }
}
@shanshin shanshin added Kover Gradle Plugin Feature Feature request issue type Kover DSL S: in progress Status: implementing or design in process labels Sep 20, 2023
@shanshin shanshin self-assigned this Sep 20, 2023
shanshin added a commit that referenced this issue Feb 19, 2024
- blocks kover and koverReports are merged
- added possibility of lazy configuration of Kover extensions
- removed the concept of default reports
- added the ability to create custom report variants
- Created interfaces for Kover tasks

Resolves #461
Resolves #410
Resolves #462
Resolves #463
Resolves #338
@shanshin shanshin reopened this Feb 20, 2024
@shanshin shanshin added S: ready for release Status: merged in the main branch and removed S: in progress Status: implementing or design in process labels Feb 20, 2024
@shanshin
Copy link
Collaborator Author

Implemented in 0.8.0-Beta.
This is not a production ready release, the plugin DSL is experimental and can be changed after receiving feedback.

@mgroth0
Copy link

mgroth0 commented Mar 4, 2024

Hey @shanshin , is there a typesafe way to add all variants from the build, without having to rely on strings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature request issue type Kover DSL Kover Gradle Plugin S: ready for release Status: merged in the main branch
Projects
None yet
Development

No branches or pull requests

2 participants