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

Added property to exclude Android classes from the instrumentation #95

Merged
merged 1 commit into from Dec 22, 2021

Conversation

shanshin
Copy link
Collaborator

Fixes #89

@qwwdfsad
Copy link
Member

The test would be nice to have though. You can even put a classfile from the reproducer to be sure the test fails with VerifyError if something goes wrong

@qwwdfsad qwwdfsad self-requested a review December 14, 2021 11:16
Copy link
Member

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

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

Please add a test with Robolectric that does not require Android plugin

@shanshin
Copy link
Collaborator Author

Please add a test with Robolectric that does not require Android plugin

Robolectric uses classes from android.jar so I think these tests can be added only after implementing support of Android tests.

@qwwdfsad
Copy link
Member

qwwdfsad commented Dec 16, 2021

@shanshin it's enough to add stub android JAR.

You can use https://github.com/Kotlin/kotlinx.coroutines/tree/master/ui/kotlinx-coroutines-android as an example of it, we have some robolectric tests without actual dependency to ART runtime

@shanshin
Copy link
Collaborator Author

@shanshin it's enough to add stub android JAR.

You can use https://github.com/Kotlin/kotlinx.coroutines/tree/master/ui/kotlinx-coroutines-android as an example of it, we have some robolectric tests without actual dependency to ART runtime

@shanshin shanshin closed this Dec 22, 2021
@shanshin shanshin reopened this Dec 22, 2021
@shanshin
Copy link
Collaborator Author

@shanshin it's enough to add stub android JAR.

You can use https://github.com/Kotlin/kotlinx.coroutines/tree/master/ui/kotlinx-coroutines-android as an example of it, we have some robolectric tests without actual dependency to ART runtime

The code checks that the android plugin has been applied, so the test can be written later when the test infrastructure for Android projects is ready.

@shanshin shanshin merged commit 1309b4c into main Dec 22, 2021
@shanshin shanshin deleted the exclude-android-package-89 branch December 22, 2021 17:02
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.

Kover breaks Robolectric
2 participants