Skip to content

Commit

Permalink
fix gradle
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand committed Dec 27, 2024
1 parent 994455a commit 1acfbc0
Showing 1 changed file with 6 additions and 33 deletions.
39 changes: 6 additions & 33 deletions java/client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,14 @@ tasks.register('cleanRust') {
}
}

tasks.register('buildRustRelease', Exec) {
commandLine 'cargo', 'build', '--release'
workingDir project.rootDir
environment CARGO_TERM_COLOR: 'always'
}

tasks.register('buildRustReleaseStrip', Exec) {
commandLine 'cargo', 'build', '--release', '--strip'
workingDir project.rootDir
environment CARGO_TERM_COLOR: 'always'
}

tasks.register('buildRust', Exec) {
commandLine 'cargo', 'build'
commandLine 'cargo', 'build', '--release'
workingDir project.rootDir
environment CARGO_TERM_COLOR: 'always'
}

tasks.register('buildRustFfi', Exec) {
commandLine 'cargo', 'build'
commandLine 'cargo', 'build', '--release'
workingDir project.rootDir
environment CARGO_TERM_COLOR: 'always', CARGO_BUILD_RUSTFLAGS: '--cfg ffi_test'
}
Expand All @@ -118,16 +106,6 @@ tasks.register('buildWithRust') {
finalizedBy 'build'
}

tasks.register('buildWithRustRelease') {
dependsOn 'buildRustRelease'
finalizedBy 'build'
}

tasks.register('buildWithRustReleaseStrip') {
dependsOn 'buildRustReleaseStrip'
finalizedBy 'build'
}

tasks.register('buildWithProto') {
dependsOn 'protobuf'
finalizedBy 'build'
Expand All @@ -143,11 +121,6 @@ tasks.register('buildAll') {
finalizedBy 'build'
}

tasks.register('buildAllRelease') {
dependsOn 'protobuf', 'buildRustRelease', 'testFfi'
finalizedBy 'build'
}

compileJava.dependsOn('protobuf')
clean.dependsOn('cleanProtobuf', 'cleanRust')

Expand All @@ -162,10 +135,10 @@ def defaultReleaseVersion = "255.255.255";
delombok.dependsOn('compileJava')
jar.dependsOn('copyNativeLib')
javadoc.dependsOn('copyNativeLib')
copyNativeLib.dependsOn('buildRustRelease')
copyNativeLib.dependsOn('buildRust')
compileTestJava.dependsOn('copyNativeLib')
test.dependsOn('buildRustRelease')
testFfi.dependsOn('buildRustRelease')
test.dependsOn('buildRust')
testFfi.dependsOn('buildRust')

test {
exclude "glide/ffi/FfiTest.class"
Expand Down Expand Up @@ -243,7 +216,7 @@ tasks.withType(Test) {
showStandardStreams true
}
// This is needed for the FFI tests
jvmArgs "-Djava.library.path=${projectDir}/../target/debug"
jvmArgs "-Djava.library.path=${projectDir}/../target/release"
}

jar {
Expand Down

0 comments on commit 1acfbc0

Please sign in to comment.