Add jna lib to jvm jar resources

This commit is contained in:
Steve Myers 2021-06-21 15:08:39 -07:00
parent e6fabc81b3
commit 90c4fd3328
2 changed files with 2 additions and 14 deletions

View File

@ -4,18 +4,6 @@ plugins {
id 'maven-publish' id 'maven-publish'
} }
test {
environment "LD_LIBRARY_PATH", file("${projectDir}/libs/x86_64_linux").absolutePath
testLogging {
events "PASSED", "SKIPPED", "FAILED", "STANDARD_OUT", "STANDARD_ERROR"
}
}
//task buildRust(type: Exec) {
// workingDir '../'
// commandLine './build.sh'
//}
dependencies { dependencies {
implementation platform('org.jetbrains.kotlin:kotlin-bom') implementation platform('org.jetbrains.kotlin:kotlin-bom')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

View File

@ -10,8 +10,8 @@ export LD_LIBRARY_PATH=`pwd`/target/debug
cc cc/bdk_ffi_test.c -o cc/bdk_ffi_test -L target/debug -l bdk_ffi -l pthread -l dl -l m cc cc/bdk_ffi_test.c -o cc/bdk_ffi_test -L target/debug -l bdk_ffi -l pthread -l dl -l m
# bdk-kotlin jar # bdk-kotlin jar
mkdir -p bdk-kotlin/jvm/libs/x86_64_linux mkdir -p bdk-kotlin/jvm/src/main/resources/jnaLibs/x86_64_linux
cp target/debug/libbdk_ffi.so bdk-kotlin/jvm/libs/x86_64_linux cp target/debug/libbdk_ffi.so bdk-kotlin/jvm/src/main/resources/jnaLibs/x86_64_linux
(cd bdk-kotlin && gradle :jvm:build) (cd bdk-kotlin && gradle :jvm:build)