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 Multiplatform plugin adapter rewritten to use reflection #103

Merged
merged 1 commit into from Dec 22, 2021

Conversation

shanshin
Copy link
Collaborator

Fixes #100

val extension = project.extensions.findByType(
KotlinMultiplatformExtension::class.java
) ?: return@safe PluginDirs(emptyList(), emptyList())
val extension =
Copy link
Member

Choose a reason for hiding this comment

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

This part of the trickery definitely needs some explanation with comments for the sake of future maintainability

Copy link
Member

Choose a reason for hiding this comment

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

+1

Copy link
Collaborator Author

@shanshin shanshin Dec 22, 2021

Choose a reason for hiding this comment

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

@qwwdfsad, @sandwwraith In addition to the comment, I can move reflection to the fail safe path (save the old code and call the new code only if an ClassNotFoundException appears). Because in most cases the Kover will be declared in the same project as the Kotlin Multiplatform Plugin.

It will be a copy paste, but it will work faster and there will be an example of exactly how the code should work with the reflection.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that would be nice

Base automatically changed from report to main December 22, 2021 16:15
@shanshin shanshin merged commit 2df005d into main Dec 22, 2021
@shanshin shanshin deleted the adapters-fix branch December 22, 2021 17:17
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.

Kotlin Multiplatform report is empty
3 participants