Closed rongcuid closed 8 months ago
Never mind, the real problem is I have no idea how gradle works.
The correct configuration (probably) is:
tasks.jextract {
// The header file from which we want to generate the bindings
header("${project.projectDir}/src/main/c/native.h") {
// The library name (don't worry about this for now)
libraries = listOf("nativeLib")
// The package under which all source files will be generated
targetPackage = "org.nativelib"
// The generated class name
className = "NativeLib"
}
}
Maybe the author can clarify how the plugin is supposed to be used in the kotlin dsl? I am still not 100% sure.
Hi @rongcuid,
Thanks for bringing this to my attention. I converted the demo project to Kotlin DSL, so that it's easier to get started.
Please let me know if this helps with your issue :slightly_smiling_face:
Closing due to inactivity
Environment
gradle-jextract
version: ___How does this bug occur?
Trying to make a new project with gradle kotlin DSL:
What happens when the bug occurs?
When trying to configure jextract class,
Val cannot be reassigned
occurs.Would you like to submit a PR fixing this bug?
[ ] YES [x] NO