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

Kover 0.7.5 breaks with merging #514

Closed
r4phab opened this issue Nov 29, 2023 · 2 comments
Closed

Kover 0.7.5 breaks with merging #514

r4phab opened this issue Nov 29, 2023 · 2 comments
Assignees
Labels
Bug Bug issue type S: waiting for clarification Status: additional information required to proceed

Comments

@r4phab
Copy link

r4phab commented Nov 29, 2023

Describe the bug
A clear and concise description of what the bug is.
I have multiple modules, some are JVM only (domain) and others and Android modules. With the latest version 0.7.5 the reports merging with JVM and Android modules is broken.
Worked fine in 0.7.3

Errors
If present, stacktraces or files from build/kover/errors directory

Execution failed for task ':app:koverGenerateArtifact'.

> Failed to notify dependency resolution listener.

   > Kover android variant 'prodRelease' was not matched with any variant from dependency ':domain' of project ':app'. Check that the Kover plugin is applied in the ':domain' project and there is a variant compatible with 'prodRelease' in it.

Expected behavior
Skip the mergedWith instruction if not found in the JVM module ?

Reproducer
A link to your project, if it is open source. Otherwise, please try to reproduce the problem on a small project.
If this is not feasible, give an example of the code on which the problem manifests itself.

Reports
If applicable, report files or screenshots.

Environment

  • Kover Gradle Plugin version: [e.g. 0.7.0]
    0.7.5
  • Gradle version: [e.g. 8.1.1]
    8.1.4
  • Kotlin project type: [e.g. Kotlin/JVM, Kotlin/Multiplatform, Kotlin/Android, Kotlin/Multiplatform + Android]
    Kotlin/JVM/Android
  • Coverage Toolset (if customized in build script): [e.g. Kover, JaCoCo, JaCoCo("0.8.10")]
    Kover default
  • Other context important for this bug: [e.g. OS version]
    Here is my Kover configuration in Groovy :
dependencies {
   kover project(":domain")
}

koverReport {
   filters {
       excludes {
           classes(koverExcludes)
           annotatedBy(*koverAnnotationsExcludes)
       }
   }
   defaults {
       mergeWith("prodRelease")

       xml {
           onCheck = false
           setReportFile(layout.buildDirectory.file("reports/kover/xml/result.xml"))
       }

       html {
           onCheck = false
           setReportDir(layout.buildDirectory.dir("reports/kover/html"))
       }
   }
}
@r4phab r4phab added Bug Bug issue type S: untriaged Status: issue reported but unprocessed labels Nov 29, 2023
@shanshin
Copy link
Collaborator

Hi,
in version 0.7.5, an additional configuration correctness check was added, so now an error is displayed indicating that the configuration is incorrect.

The uncontrolled using of mergeWith can lead to unexpected consequences, optionality feature will be implemented in the next version of DSL.

Now you can use the steps described in this comment to specify a more correct configuration.

@shanshin shanshin added S: waiting for clarification Status: additional information required to proceed and removed S: untriaged Status: issue reported but unprocessed labels Nov 29, 2023
@r4phab
Copy link
Author

r4phab commented Dec 6, 2023

@shanshin Indeed we updated our configuration following the comment you mentioned and it works now ! Thank you very much for guiding us in the right direction 🥳

@r4phab r4phab closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug issue type S: waiting for clarification Status: additional information required to proceed
Projects
None yet
Development

No branches or pull requests

2 participants