kotlin
kotlin copied to clipboard
KT-37080: (maven-plugin) config for force execution even without Kotlin sources
In case if Kotlin needs to be added to the existing Java/Maven project there is a need to reconfigure maven-compiler-plugin to set the proper order of executions. In the end kotlin-maven-plugin will be executed first. This can be not an ideal case for projects that are using annotation processing quite heavily. For example project may contain multiple modules and maven-compiler-plugin is configured in the root POM to unify the setup once. But in case if configuration contained annotation processing it is recommended to let this be done by kapt. But kapt does not perform annotation processing for modules where there is only java source code.
Detailed example:
- root-module
-- java-only-module
-- ... other modules
-- java-kotlin-module
root-modulecontainsmaven-compiler-pluginconfiguration with annotation processors
other modules are using this single config for build
After adding Kotlin to java-kotlin-module there is a need to reconfigure maven-compiler-plugin. But after this reconfiguration annotation processing will stop working in modules other than this one.
This is a limitation that can be solved by current PR. The idea is to allow force execution of kapt via a dedicated parameter - forceExecutionWithoutKotlinSources. The default is still false to be compatible.
@cy6erGn0m, any information on when this can be merged?
1.4 may be, need to discuss
It would be awesome! please let me know if there are any remarks so we do not delay it for longer
@cy6erGn0m, kotlin 1.4-M1 has been released recently. What about current PR, can we also proceed?
@abelkov, @cy6erGn0m, hello guys, do you have any information if this PR has any chance to get into 1.4? if not then what is missing and how can I help?
hello @cy6erGn0m, any updates here?
cc @CherepanovAleksei
Sorry, I don't work on maven plugin any longer
Sorry, I don't work on maven plugin any longer
I see, no problem, but I would update the assignment. And who is the new contact person for this issue?