We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The HK2 Metadata Generator seems to generate nothing for Kotlin projects. Is there any way to adapt the HK2 Metadata Generator for Kotlin?
Currently I'm using a dirty workaround with a custom Gradle task:
dependencies { "implementation"(kotlin("stdlib-jdk8")) "implementation"("org.glassfish.hk2:hk2:2.6.1") "implementation"("org.glassfish.jersey.containers:jersey-container-jetty-http:2.30") "compileOnly"("org.glassfish.hk2:hk2-inhabitant-generator:2.6.1") invoke { configurations["implementation"].isCanBeResolved = true } } tasks { val hk2InhabitantGeneration = register<JavaExec>("hk2InhabitantGeneration") { onlyIf { project.buildDir.resolve("classes/kotlin/main").isDirectory } classpath = configurations["compileClasspath"] main = "org.jvnet.hk2.generator.HabitatGenerator" args = listOf( "--searchPath", configurations["implementation"].asPath, "--file", project.buildDir.resolve("classes/kotlin/main").absolutePath, "--directory", project.buildDir.resolve("resources/main/META-INF/hk2-locator").absolutePath) } named("classes") { doFirst { hk2InhabitantGeneration.get().exec() } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The HK2 Metadata Generator seems to generate nothing for Kotlin projects. Is there any way to adapt the HK2 Metadata Generator for Kotlin?
Currently I'm using a dirty workaround with a custom Gradle task:
The text was updated successfully, but these errors were encountered: