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

Pass javac options to Kapt javacArguments so the javac_options warn='off' option works for annotation processors that print warnings #1079

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cheister
Copy link
Contributor

In our codebase we're using the MapStruct annotation processor which can print out a lot of warnings for unmapped target properties when the annotation processors are run.

Using javac_options with warn = "off"

kt_javac_options(
    name = "javac_options",
    warn = "off"
)

does not silience these warnings and using javac_options with warn = "error" does not cause errors for these warnings.

The reason is because the javac options were not passed to the Kapt processor invocation. This PR passes the javac_options to the Kapt processor and adds the parameter "-Xlint:none" so the annotation processor warnings are silenced when using warn = "off"

…off' option works for annotation processors that print warnings
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.

1 participant