Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gradle #2879

Merged
merged 3 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java/benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
}

run.dependsOn ':client:buildRustRelease'
run.dependsOn ':client:buildRust'

application {
// Define the main class for the application.
Expand Down
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
2 changes: 1 addition & 1 deletion java/integTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ clearDirs.finalizedBy 'startStandalone'
clearDirs.finalizedBy 'startCluster'
clearDirs.finalizedBy 'startClusterForAz'
test.finalizedBy 'stopAllAfterTests'
test.dependsOn ':client:buildRustRelease'
test.dependsOn ':client:buildRust'

tasks.withType(Test) {
doFirst {
Expand Down
Loading