|
@@ -62,7 +62,7 @@ impl From<Options> for crate::dev::Options {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-pub fn command(options: Options) -> Result<()> {
|
|
|
|
|
|
+pub fn command(options: Options, noise_level: NoiseLevel) -> Result<()> {
|
|
delete_codegen_vars();
|
|
delete_codegen_vars();
|
|
with_config(Some(Default::default()), |root_conf, config, metadata| {
|
|
with_config(Some(Default::default()), |root_conf, config, metadata| {
|
|
set_var(
|
|
set_var(
|
|
@@ -72,7 +72,8 @@ pub fn command(options: Options) -> Result<()> {
|
|
set_var("WRY_RUSTWEBVIEW_CLASS_INIT", WEBVIEW_CLASS_INIT);
|
|
set_var("WRY_RUSTWEBVIEW_CLASS_INIT", WEBVIEW_CLASS_INIT);
|
|
ensure_init(config.project_dir(), MobileTarget::Android)
|
|
ensure_init(config.project_dir(), MobileTarget::Android)
|
|
.map_err(|e| Error::ProjectNotInitialized(e.to_string()))?;
|
|
.map_err(|e| Error::ProjectNotInitialized(e.to_string()))?;
|
|
- run_dev(options, root_conf, config, metadata).map_err(|e| Error::DevFailed(format!("{:#}", e)))
|
|
|
|
|
|
+ run_dev(options, root_conf, config, metadata, noise_level)
|
|
|
|
+ .map_err(|e| Error::DevFailed(format!("{:#}", e)))
|
|
})
|
|
})
|
|
.map_err(Into::into)
|
|
.map_err(Into::into)
|
|
}
|
|
}
|
|
@@ -82,6 +83,7 @@ fn run_dev(
|
|
root_conf: &Config,
|
|
root_conf: &Config,
|
|
config: &AndroidConfig,
|
|
config: &AndroidConfig,
|
|
metadata: &AndroidMetadata,
|
|
metadata: &AndroidMetadata,
|
|
|
|
+ noise_level: NoiseLevel,
|
|
) -> Result<()> {
|
|
) -> Result<()> {
|
|
let mut dev_options = options.clone().into();
|
|
let mut dev_options = options.clone().into();
|
|
let mut interface = crate::dev::setup(&mut dev_options)?;
|
|
let mut interface = crate::dev::setup(&mut dev_options)?;
|
|
@@ -121,7 +123,7 @@ fn run_dev(
|
|
if open {
|
|
if open {
|
|
open_and_wait(config)
|
|
open_and_wait(config)
|
|
} else {
|
|
} else {
|
|
- match run(options, root_conf, config, metadata) {
|
|
|
|
|
|
+ match run(options, root_conf, config, metadata, noise_level) {
|
|
Ok(c) => Ok(Box::new(c) as Box<dyn DevProcess>),
|
|
Ok(c) => Ok(Box::new(c) as Box<dyn DevProcess>),
|
|
Err(Error::FailedToPromptForDevice(e)) => {
|
|
Err(Error::FailedToPromptForDevice(e)) => {
|
|
log::error!("{}", e);
|
|
log::error!("{}", e);
|
|
@@ -139,13 +141,13 @@ fn run(
|
|
root_conf: &Config,
|
|
root_conf: &Config,
|
|
config: &AndroidConfig,
|
|
config: &AndroidConfig,
|
|
metadata: &AndroidMetadata,
|
|
metadata: &AndroidMetadata,
|
|
|
|
+ noise_level: NoiseLevel,
|
|
) -> Result<DevChild, Error> {
|
|
) -> Result<DevChild, Error> {
|
|
let profile = if options.debug {
|
|
let profile = if options.debug {
|
|
Profile::Debug
|
|
Profile::Debug
|
|
} else {
|
|
} else {
|
|
Profile::Release
|
|
Profile::Release
|
|
};
|
|
};
|
|
- let noise_level = NoiseLevel::Polite;
|
|
|
|
|
|
|
|
let build_app_bundle = metadata.asset_packs().is_some();
|
|
let build_app_bundle = metadata.asset_packs().is_some();
|
|
|
|
|