Get flutter deps when build

This commit is contained in:
Asura 2022-09-01 23:58:14 -07:00
parent bc7611ae0d
commit a4ee1bcc38

View File

@ -77,6 +77,17 @@ fn install_oboe() {
}
fn gen_flutter_rust_bridge() {
// Get dependent of flutter
println!("cargo:rerun-if-changed=flutter/pubspec.lock");
println!("cargo:rerun-if-changed=flutter/pubspec.yaml");
if !std::path::Path::new("./flutter/.packages").exists(){
std::process::Command::new("flutter")
.args(["pub", "get"])
.current_dir("./flutter")
.output()
.expect("failed to execute flutter pub get");
};
let llvm_path = match std::env::var("LLVM_HOME") {
Ok(path) => Some(vec![path]),
Err(_) => None,