crossbundle_tools/commands/common/gen_minimal_project/
mod.rs

1mod consts;
2mod gen_min_project;
3
4pub use consts::*;
5pub use gen_min_project::*;
6
7use std::{fs::File, io::Write};
8
9/// Creates resource folder with string.xml resource inside to minimal project
10pub fn create_res_folder(out_dir: &std::path::Path) -> crate::error::Result<()> {
11    // Create res/values folder
12    let res_path = out_dir.join("res").join("values");
13    std::fs::create_dir_all(res_path.clone())?;
14    // Create strings.xml
15    let strings_xml_path = res_path.join("strings.xml");
16    let mut strings_xml = File::create(strings_xml_path)?;
17    strings_xml.write_all(STRINGS_XML_VALUE.as_bytes())?;
18    Ok(())
19}