Answer the question
In order to leave comments, you need to log in
How to include dll libraries in gradle project?
I have a gradle project in java. The project uses the jcpt engine , for its operation it is required to connect several jar-nicknames and native libraries (link) (windiws - .dll, linux - .so). If it’s still clear with .so for linux how to get close (I found this article on Habré, in which it is advised to place all .so files in a jar archive and connect this archive), then how to connect .dll for Windows remains completely incomprehensible (place it in the same way in jar failed). How can I do that?
build.gradle looks like this:
apply plugin: 'java'
apply plugin: "application"
mainClassName = "ru.cfif11.cosmo.Main"
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
version = '1.0'
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile files("jpct/lib/jpct/jpct.jar")
compile files("jpct/lib/lwjgl-2.8.0/jar/lwjgl.jar")
compile files("jpct/lib/lwjgl-2.8.0/jar/lwjgl_util.jar")
}
jar {
manifest.attributes("Main-Class": mainClassName);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question