Skip to content

Commit d05b3c6

Browse files
committed
bindings.java : enable copyLibs task [no ci]
This commit adds a dependency on the copyLibs task to the sourcesJar and jar tasks. This ensures that the libwhisper.so file is copied to the correct location before the jar is built. It also sets the executable bit on the gradlew file.
1 parent 996581c commit d05b3c6

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

bindings/java/build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ sourceSets {
2525
}
2626

2727
tasks.register('copyLibwhisperDynlib', Copy) {
28-
from '../../build'
28+
from '../../build/src'
2929
include 'libwhisper.dynlib'
3030
into 'build/generated/resources/main/darwin'
3131
}
3232

3333
tasks.register('copyLibwhisperSo', Copy) {
34-
from '../../build'
34+
from '../../build/src'
3535
include 'libwhisper.so'
3636
into 'build/generated/resources/main/linux-x86-64'
3737
}
@@ -55,7 +55,12 @@ java {
5555
withJavadocJar()
5656
}
5757

58+
sourcesJar() {
59+
dependsOn copyLibs
60+
}
61+
5862
jar {
63+
dependsOn copyLibs
5964
exclude '**/whisper_java.exp', '**/whisper_java.lib'
6065
}
6166

@@ -67,6 +72,8 @@ tasks.withType(Test) {
6772
useJUnitPlatform()
6873
}
6974

75+
test.dependsOn copyLibs
76+
7077
dependencies {
7178
implementation "net.java.dev.jna:jna:5.13.0"
7279
testImplementation "org.junit.jupiter:junit-jupiter:5.9.2"

bindings/java/gradlew

100644100755
File mode changed.

0 commit comments

Comments
 (0)