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

Ignore module or task from kover #593

Closed
igorromcy opened this issue Apr 1, 2024 · 3 comments
Closed

Ignore module or task from kover #593

igorromcy opened this issue Apr 1, 2024 · 3 comments
Assignees
Labels
Question Support request issue type S: untriaged Status: issue reported but unprocessed

Comments

@igorromcy
Copy link

Hi team!

I'm trying to ignore this whole module or this particular task from the kover execution but seems that I'm not doing that right.

error:
1 task failure
the :testlab:kaptDebugKotlin task failed

my config:

kover {
    merge {
        allProjects()
        createVariant("coverage") {
            it.addWithDependencies(["fastDebug", "debug"] as String[], true)
        }
        instrumentation {
            excludedClasses.addAll(
                    "com.package.testlab"
            )
        }
    }
}

I also tried with

disabledForTestTasks.addAll(
    "kaptDebugKotlin"
)

and

disabledForTestTasks.addAll(
    ":testlab:kaptDebugKotlin"
)

but it didn't work, any ideas?

I'm using the 0.8.0-Beta version

@igorromcy igorromcy added Question Support request issue type S: untriaged Status: issue reported but unprocessed labels Apr 1, 2024
@shanshin
Copy link
Collaborator

shanshin commented Apr 2, 2024

Hi,
the kaptDebugKotlin task does not look like a Gradle test task.
May you trace which task depends on it? Perhaps this is the task of compiling the source code for the debug Android build variant

@igorromcy
Copy link
Author

That's right, but since I need to exclude this test lab module anyway, I did that by:

def ignoredModules = [
":testlab",
":other:module"
]

kover {
merge {
allProjects {
!ignoredModules.contains(it.path)
}
}

do you think there is another way to do that by using the excluded block?

@shanshin
Copy link
Collaborator

shanshin commented Apr 2, 2024

Filter in allProjects is the preferred way if you don't want classes from :testlab to be included in the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Support request issue type S: untriaged Status: issue reported but unprocessed
Projects
None yet
Development

No branches or pull requests

2 participants