godot-kotlin-jvm: Kotlin reflect doesn't work
Let’s say I want to check if a class has an annotation:
packet::class.hasAnnotation<HotPacket>()
In order to achieve that I populated build.gradle.kts with
implementation(kotlin("reflect"))
Unfortunately I get this error:
kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (14 by maintainers)
@AutonomicPerfectionist no not yet. Neither of us got around to do the necessary changes yet. I might have a look tomorrow. If not: adding the reflect dependency here should be enough: https://github.com/utopia-rise/godot-kotlin-jvm/blob/master/kt/plugins/godot-gradle-plugin/src/main/kotlin/godot/gradle/projectExt/setupConfigurationsAndCompilations.kt#L34 You then need to copy the resulting bootstrap.jar alongside the editor executable and thus override the one we ship. For exported builds it should then work without copying anything.