Skip to content

Commit

Permalink
ci: make build.rs copy libs to OUTPUT_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
nmammeri committed Jun 8, 2024
1 parent 6dc8eb8 commit 0319cab
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions extract-core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ fn main() {
gradle_build(&gradle, &tika_native_dir, &out_dir, &dist_dir);

// Tell cargo to look for shared libraries in the specified directory
//println!("cargo:rustc-link-search={}", out_dir.display());
println!("cargo:rustc-link-search={}", dist_dir.display());
println!("cargo:rustc-link-search={}", out_dir.display());
//println!("cargo:rustc-link-search={}", dist_dir.display());
// Tell cargo to tell rustc to link the `tika_native` shared library.
println!("cargo:rustc-link-lib=dylib=tika_native");
}

// Run the gradle build command to build tika-native
fn gradle_build(gradle: &PathBuf, tika_native_dir: &PathBuf,
out_dir: &PathBuf, dist_dir: &PathBuf
out_dir: &PathBuf, _dist_dir: &PathBuf
) {
Command::new(gradle)
.current_dir(tika_native_dir)
Expand All @@ -54,10 +54,10 @@ fn gradle_build(gradle: &PathBuf, tika_native_dir: &PathBuf,
let mut options = fs_extra::dir::CopyOptions::new();
options.overwrite = true;
options.content_only = true;
// fs_extra::dir::copy(&build_path, out_dir, &options)
// .expect("Failed to copy build artifacts to OUTPUT_DIR");
fs_extra::dir::copy(&build_path, dist_dir, &options)
.expect("Failed to copy build artifacts to OUTPUT_DIR");
fs_extra::dir::copy(&build_path, out_dir, &options)
.expect("Failed to copy build artifacts to OUTPUT_DIR");
//fs_extra::dir::copy(&build_path, dist_dir, &options)
// .expect("Failed to copy build artifacts to DIST_DIR");
}

// Return the path to the GraalVM JDK or panics if it can't be found
Expand Down

0 comments on commit 0319cab

Please sign in to comment.