Closed mattmess1221 closed 2 years ago
This should be re-opened on the API as it is handling the generation of the mcmod.info.
The api works fine. The file kapt generates is in /build/tmp/kapt3/classes/main and is what I expect it to do.
On Tue, Jul 25, 2017, 5:18 PM Chris Sanders notifications@github.com wrote:
Closed #11 https://github.com/SpongePowered/SpongeGradle/issues/11.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SpongePowered/SpongeGradle/issues/11#event-1178826203, or mute the thread https://github.com/notifications/unsubscribe-auth/ADQIKtOy1YetymccDDNG1HNNdqAuxrJyks5sRlulgaJpZM4OjEwK .
@kashike
See above.
@killjoy1221 After looking at this a bit more, I'm not sure if there's a real good way to handle this. If you've got a suggestion, feel free to give it - or send a pull request, if you like.
Relevant:
It was caused by kapt itself actually. I was told that I needed the kotlin-kapt plugin in order for the annotation processor to work, but it was a lie. Annotation processing works just fine with just the kotlin plugin.
Additionally, it looks like compileJava takes care kotlin files as well.
Actually, that seemed to be a fluke. I got it to work by adding these lines to my buildscript.
compileKotlin.dependsOn generateMetadata
kapt {
processors += 'org.spongepowered.plugin.processor.PluginProcessor'
arguments {
arg 'extraMetadataFiles', generateMetadata.target
arg 'metadataOutputFile', generateMetadata.target
}
}
afterEvaluate { tasks.kaptKotlin.outputs.upToDateWhen { false } }
For some reason, I think the kaptKotlin task is created in afterEvaluate.
Can we re-open this? It's still an issue when trying to use SpongeAPI with Kotlin
Pull requests are welcome.
This issue is no longer applicable to SpongeGradle 2.0.0+
I have a plugin using kotlin, but the generated mcmod.info is not complete. It only has name, modid, version, and description.
The plugin I'm building is here. https://github.com/killjoy1221/NoClip