gradle-nbm-plugin
gradle-nbm-plugin copied to clipboard
[Workaround] Annotated Kotlin classes aren't added to generated-layer.xml
I see there are generated .class
es from Kotlin files in the generated jar
but there is no info about these classes in the generated-layer.xml
.
I guess the problem is because the JavaPlugin is used in that method:
https://github.com/radimk/gradle-nbm-plugin/blob/e943560a766d85492f972e199eaee2c131a56ebc/plugin/src/main/groovy/org/gradle/plugins/nbm/NbmPlugin.groovy#L30-L33
Maybe I will find some time to investigate better and send a PR.
Workaround I use for now: monotonously register my classes in the layer.xml
😊
I miss what is the expected behavior. An example where you can demonstrate what you're doing and what error or lack of functionality you see would help.
OK, will provide a repo with the problem demo in two days.
Managed sooner. Please check it out: https://github.com/SerVB/gradle-nbm-plugin/tree/sample-kotlin/samples/standalone-kotlin.
The sample you provide (sample:standalone
):
My sample is the same, just converted classes to Kotlin (sample:standalone-kotlin
):
So you see annotation version isn't applied. It's because Kotlin annotated classes aren't added to generated-layer
.
Expected behavior is the same as for Java sample because the code is literally the same.
I've deleted my fork. You can create sample:standalone-kotlin
by simply converting Java classes to Kotlin (via IDEA, for example), if you want to reproduce.