Skip to content

Improving on JniLibraryComposingFromSource-0.5.0-930919a0-kotlin-dsl #859

@btbouwens

Description

@btbouwens

I downloaded the zip file for this, and tried to build. It wouldn't because some Groovy obsolescence.

I tried again with a newer Gradle and it worked.

But then: the cpp-jni-greeter/src/main/headers/com_example_greeter_Greeter.h should not be there, as it is also generated by the java-jni-greeter subproject, which will be picked up by:

@@ -20,7 +21,7 @@ library {
                                it.operatingSystem.isLinux -> listOf(File("${Jvm.current().javaHome.absolutePath}/include/linux"))
                                it.operatingSystem.isWindows -> listOf(File("${Jvm.current().javaHome.absolutePath}/include/win32"))
                                else -> emptyList()
-                       }
+                       } + "../java-jni-greeter/build/generated/sources/headers/java/main/"
                })
                compileTask.get().setPositionIndependentCode(true)
        }

But then, this should be built first, so a dependency should be defined. I don't understand how.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions