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

Kotlin muiltplatrom is not supported #316

Closed
ghost opened this issue Mar 3, 2023 · 5 comments · Fixed by #327
Closed

Kotlin muiltplatrom is not supported #316

ghost opened this issue Mar 3, 2023 · 5 comments · Fixed by #327
Assignees
Labels
Bug Bug issue type S: confirmed Status: bug is reproduced or present

Comments

@ghost
Copy link

ghost commented Mar 3, 2023

Describe the bug
A clear and concise description of what the bug is.

How can I tell kover my testing report is on that path?
Errors
Task 'koverHtmlReport' will be skipped because no tests were executed

Expected behavior
test coverage file should be created

Reproducer
KoverKMM.zip
Fresh kmm project Android studio with kover added

is there anything similar to jacoco classDirectories in kover

tasks.jacocoTestReport {
val coverageSourceDirs = arrayOf(
"src/commonMain",
"src/jvmMain"
)

val classFiles = File("${buildDir}/classes/kotlin/jvm/")
        .walkBottomUp()
        .toSet()

classDirectories.setFrom(classFiles)
sourceDirectories.setFrom(files(coverageSourceDirs))

executionData
        .setFrom(files("${buildDir}/jacoco/jvmTest.exec"))


will be skipped because no tests were executed

please provide as kmm example in examples file

for 7.0 alpha

for 0.6.1 it is working

@ghost ghost added Bug Bug issue type S: untriaged Status: issue reported but unprocessed labels Mar 3, 2023
@ghost ghost assigned shanshin Mar 3, 2023
@shanshin shanshin added S: confirmed Status: bug is reproduced or present and removed S: untriaged Status: issue reported but unprocessed labels Mar 8, 2023
@shanshin
Copy link
Collaborator

shanshin commented Mar 8, 2023

Thanks for the reproducer!

Multiplatform projects are supported, however, at the moment a combination of kotlin("multiplatform") and id("com.android.application") plugins is not supported.

@shanshin
Copy link
Collaborator

shanshin commented Mar 8, 2023

Relates #312

shanshin added a commit that referenced this issue Mar 27, 2023
- implemented work with build variants with different sets of product flavors
- implemented support of android targets in Kotlin multiplatform
- implemented ability to export and add some Android build variant to the default report
- Kover setups renamed to Kover artifacts
- introduced the concept of Kover namespace

Fixes #316
Fixes #319
shanshin added a commit that referenced this issue Apr 21, 2023
- implemented work with build variants with different sets of product flavors
- implemented support of android targets in Kotlin multiplatform
- implemented ability to export and add some Android build variant to the default report

Fixes #316
Fixes #319

PR #327

Co-authored-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
Co-authored-by: Leonid Startsev <sandwwraith@users.noreply.github.com>
@shanshin
Copy link
Collaborator

Fixed in 0.7.0-Beta

@aplha98
Copy link

aplha98 commented Apr 23, 2023

for those configration , I can confirmed that the issue not resolved

koverReport {
    filters {
        excludes {
            classes("com.beno.benoShared.BuildConfig")
            packages("com.beno.benoShared.testData.*")
            packages("com.beno.benoShared.v3.*")
            packages("com.beno.benoShared.db.*")

        }
        includes {
            packages("com.beno.benoShared.*")
        }
    }
}

kover {
    useKoverTool()

    excludeTests {
        tasks("testReleaseUnitTest")
    }
}```

@shanshin
Copy link
Collaborator

@aplha98, please create a new issue with a detailed description of your problem.
A small reproducer project would also help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug issue type S: confirmed Status: bug is reproduced or present
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants