[kapt] allow options to be passed to kapt and javac annotation processing. #1354
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements
kapt_compiler_plugin
, which allows the use ofkt_plugin_cfg
to pass option to annotation processors.This is step one of moving kapt out of the builder, and enhancing the
kt_compiler_plugin
support.Changes:
resolve_cfg
signature change (no one is using it, as it's limited and complicated) to return a list of providers. This allows a compiler plugin to export configurations in a clearer manner.annotation_processor_options
toJavacOptions
. This is not exposed onkt_javac_opts
, asannotation_processor_options
should always be associated with an annotation processor -- to avoid orphaned arguments being passed indefinitely. A rule could exploit this to make a mess, but that is on the author. I hope to avoid regretting this feature.base64
args encoding to optimize on single argument values. The whole protocol for this in kapt is a right mess.Example:
This will add the undocumented argument
com.google.auto.value.OmitIdentifiers
to AutoValue processing.:autovalue_no_identifiers
can be added tokt_jvm_library.plugins
to trigger annotation processing.towards: #1311