bbqsrc/cargo-ndk

Copy all .so files instead of the ones just generated.

ganfra opened this issue · 1 comments

We have multiple ffi modules in our project we compile for different gradle modules.
This code

cargo-ndk/src/cli.rs

Lines 386 to 396 in 8478e58

let so_files = match fs::read_dir(&dir) {
Ok(dir) => dir
.filter_map(Result::ok)
.map(|x| x.path())
.filter(|x| x.extension() == Some(OsStr::new("so")))
.collect::<Vec<_>>(),
Err(e) => {
log::error!("{} {:?}", e, dir);
std::process::exit(1);
}
};

is copying all the .so files in the target directories. We end up having so files from previous build because of that.
The copy method should just target the files we generated from the build instead.

Happy to accept a pull request that does so 😄