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

Detect if the plugin kotlin-parcelize is not used #799

Open
BraisGabin opened this issue Oct 27, 2022 · 3 comments
Open

Detect if the plugin kotlin-parcelize is not used #799

BraisGabin opened this issue Oct 27, 2022 · 3 comments
Labels
enhancement New feature or request toolchain:kotlin

Comments

@BraisGabin
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Detect unused if a module declares the plugin id("kotlin-parcelize") and doesn't use it.

Describe the solution you'd like
Raise a suggestion to remove kotlin-parcelize if the annotation @Parcelize is not used.

@autonomousapps
Copy link
Owner

@BraisGabin would you mind contributing a failing test?

@BraisGabin
Copy link
Contributor Author

Sure! But I'm not sure how to contribute a test. I was checking for tests related with the kapt advice but I couldn't find any. And even removing code related with the kapt advice ./gradlew test is still green.

Is there any similar test so I can follow the pattern?

@autonomousapps
Copy link
Owner

Hm let me restate. You really can't contribute a failing test because the plugin wouldn't have any reason to fail in the presence of this unused plugin. So what you could do is contribute a test that would fail if that feature existed.

If you take a look at AnnotationProcessorSpec, you'll see a bunch of tests relating to kapt.

BraisGabin added a commit to BraisGabin/dependency-analysis-android-gradle-plugin that referenced this issue Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request toolchain:kotlin
Projects
None yet
Development

No branches or pull requests

2 participants