Эх сурвалжийг харах

chore(deps): rename cargo-mobile to tauri-mobile

Lucas Nogueira 2 жил өмнө
parent
commit
c1cd0f5253

+ 41 - 41
tooling/cli/Cargo.lock

@@ -375,46 +375,6 @@ dependencies = [
  "pkg-config",
 ]
 
-[[package]]
-name = "cargo-mobile"
-version = "0.1.0"
-source = "git+https://github.com/tauri-apps/cargo-mobile?branch=dev#f117968d675537bc753b53d608a3743815de9689"
-dependencies = [
- "cocoa",
- "colored 1.9.3",
- "core-foundation 0.7.0",
- "deunicode",
- "dunce",
- "embed-resource",
- "english-numbers",
- "env_logger 0.7.1",
- "freedesktop_entry_parser",
- "handlebars 3.5.5",
- "heck 0.4.0",
- "home",
- "ignore",
- "indexmap",
- "java-properties",
- "lexical-core",
- "libc",
- "log",
- "objc",
- "objc_id",
- "once-cell-regex",
- "openssl",
- "os_pipe",
- "path_abs",
- "serde",
- "serde_json",
- "structopt",
- "textwrap",
- "thiserror",
- "toml",
- "ureq",
- "winapi",
- "windows",
-]
-
 [[package]]
 name = "cc"
 version = "1.0.73"
@@ -3895,7 +3855,6 @@ dependencies = [
  "anyhow",
  "axum",
  "base64",
- "cargo-mobile",
  "clap 4.0.9",
  "colored 2.0.0",
  "common-path",
@@ -3929,6 +3888,7 @@ dependencies = [
  "sublime_fuzzy",
  "tauri-bundler",
  "tauri-icns",
+ "tauri-mobile",
  "tauri-utils",
  "textwrap",
  "thiserror",
@@ -3963,6 +3923,46 @@ dependencies = [
  "png",
 ]
 
+[[package]]
+name = "tauri-mobile"
+version = "0.1.0"
+source = "git+https://github.com/tauri-apps/cargo-mobile?branch=dev#5318e9bbe5c42c155ce8a0810d79e6e7c699a6bb"
+dependencies = [
+ "cocoa",
+ "colored 1.9.3",
+ "core-foundation 0.7.0",
+ "deunicode",
+ "dunce",
+ "embed-resource",
+ "english-numbers",
+ "env_logger 0.7.1",
+ "freedesktop_entry_parser",
+ "handlebars 3.5.5",
+ "heck 0.4.0",
+ "home",
+ "ignore",
+ "indexmap",
+ "java-properties",
+ "lexical-core",
+ "libc",
+ "log",
+ "objc",
+ "objc_id",
+ "once-cell-regex",
+ "openssl",
+ "os_pipe",
+ "path_abs",
+ "serde",
+ "serde_json",
+ "structopt",
+ "textwrap",
+ "thiserror",
+ "toml",
+ "ureq",
+ "winapi",
+ "windows",
+]
+
 [[package]]
 name = "tauri-utils"
 version = "1.2.0"

+ 2 - 2
tooling/cli/Cargo.toml

@@ -39,8 +39,8 @@ name = "cargo-tauri"
 path = "src/main.rs"
 
 [dependencies]
-# cargo-mobile = { path = "../../../cargo-mobile/", default-features = false }
-cargo-mobile = { git = "https://github.com/tauri-apps/cargo-mobile", branch = "dev", default-features = false }
+# tauri-mobile = { path = "../../../cargo-mobile/", default-features = false }
+tauri-mobile = { git = "https://github.com/tauri-apps/cargo-mobile", branch = "dev", default-features = false }
 textwrap = { version = "0.11.0", features = ["term_size"] }
 jsonrpsee = { version = "0.16", features = [ "client", "server" ]}
 thiserror = "1"

+ 1 - 1
tooling/cli/src/info.rs

@@ -889,7 +889,7 @@ pub fn command(_options: Options) -> Result<()> {
   if tauri_dir.is_some() {
     let p = tauri_dir.as_ref().unwrap();
     if p.join("gen/apple").exists() {
-      let teams = cargo_mobile::apple::teams::find_development_teams().unwrap_or_default();
+      let teams = tauri_mobile::apple::teams::find_development_teams().unwrap_or_default();
       Section("iOS").display();
       InfoBlock::new(
         "Teams",

+ 9 - 9
tooling/cli/src/mobile/android.rs

@@ -2,7 +2,14 @@
 // SPDX-License-Identifier: Apache-2.0
 // SPDX-License-Identifier: MIT
 
-use cargo_mobile::{
+use clap::{Parser, Subcommand};
+use std::{
+  env::set_var,
+  thread::{sleep, spawn},
+  time::Duration,
+};
+use sublime_fuzzy::best_match;
+use tauri_mobile::{
   android::{
     adb,
     config::{Config as AndroidConfig, Metadata as AndroidMetadata, Raw as RawAndroidConfig},
@@ -16,13 +23,6 @@ use cargo_mobile::{
   os,
   util::prompt,
 };
-use clap::{Parser, Subcommand};
-use std::{
-  env::set_var,
-  thread::{sleep, spawn},
-  time::Duration,
-};
-use sublime_fuzzy::best_match;
 
 use super::{
   ensure_init, get_app,
@@ -142,7 +142,7 @@ pub fn with_config<T>(
 
 fn env() -> Result<Env> {
   let env = super::env()?;
-  cargo_mobile::android::env::Env::from_env(env).map_err(Into::into)
+  tauri_mobile::android::env::Env::from_env(env).map_err(Into::into)
 }
 
 fn delete_codegen_vars() {

+ 1 - 1
tooling/cli/src/mobile/android/android_studio_script.rs

@@ -2,7 +2,7 @@ use super::{detect_target_ok, ensure_init, env, with_config, MobileTarget};
 use crate::Result;
 use clap::{ArgAction, Parser};
 
-use cargo_mobile::{
+use tauri_mobile::{
   android::target::Target,
   opts::Profile,
   target::{call_for_targets_with_fallback, TargetTrait},

+ 1 - 1
tooling/cli/src/mobile/android/build.rs

@@ -10,7 +10,7 @@ use crate::{
 };
 use clap::{ArgAction, Parser};
 
-use cargo_mobile::{
+use tauri_mobile::{
   android::{aab, apk, config::Config as AndroidConfig, env::Env, target::Target},
   opts::{NoiseLevel, Profile},
   target::TargetTrait,

+ 1 - 1
tooling/cli/src/mobile/android/dev.rs

@@ -10,7 +10,7 @@ use crate::{
 };
 use clap::{ArgAction, Parser};
 
-use cargo_mobile::{
+use tauri_mobile::{
   android::{
     config::{Config as AndroidConfig, Metadata as AndroidMetadata},
     env::Env,

+ 1 - 1
tooling/cli/src/mobile/android/open.rs

@@ -1,6 +1,6 @@
 use super::{ensure_init, env, with_config, MobileTarget};
 use crate::Result;
-use cargo_mobile::os;
+use tauri_mobile::os;
 
 pub fn command() -> Result<()> {
   with_config(

+ 3 - 3
tooling/cli/src/mobile/android/project.rs

@@ -4,7 +4,9 @@
 
 use crate::{helpers::template, Result};
 use anyhow::Context;
-use cargo_mobile::{
+use handlebars::Handlebars;
+use include_dir::{include_dir, Dir};
+use tauri_mobile::{
   android::{
     config::{Config, Metadata},
     target::Target,
@@ -18,8 +20,6 @@ use cargo_mobile::{
     prefix_path,
   },
 };
-use handlebars::Handlebars;
-use include_dir::{include_dir, Dir};
 
 use std::{ffi::OsStr, fs, path::Path};
 

+ 2 - 2
tooling/cli/src/mobile/init.rs

@@ -5,7 +5,8 @@
 use super::{get_app, Target};
 use crate::helpers::{config::get as get_tauri_config, template::JsonMap};
 use crate::Result;
-use cargo_mobile::{
+use handlebars::{Context, Handlebars, Helper, HelperResult, Output, RenderContext, RenderError};
+use tauri_mobile::{
   android::{
     config::Config as AndroidConfig, env::Env as AndroidEnv, target::Target as AndroidTarget,
   },
@@ -17,7 +18,6 @@ use cargo_mobile::{
     cli::{Report, TextWrapper},
   },
 };
-use handlebars::{Context, Handlebars, Helper, HelperResult, Output, RenderContext, RenderError};
 
 use std::{env::current_dir, path::PathBuf};
 

+ 3 - 3
tooling/cli/src/mobile/ios.rs

@@ -2,7 +2,9 @@
 // SPDX-License-Identifier: Apache-2.0
 // SPDX-License-Identifier: MIT
 
-use cargo_mobile::{
+use clap::{Parser, Subcommand};
+use sublime_fuzzy::best_match;
+use tauri_mobile::{
   apple::{
     config::{
       Config as AppleConfig, Metadata as AppleMetadata, Platform as ApplePlatform,
@@ -19,8 +21,6 @@ use cargo_mobile::{
   os,
   util::prompt,
 };
-use clap::{Parser, Subcommand};
-use sublime_fuzzy::best_match;
 
 use super::{
   ensure_init, env, get_app,

+ 1 - 1
tooling/cli/src/mobile/ios/build.rs

@@ -10,7 +10,7 @@ use crate::{
 };
 use clap::{ArgAction, Parser};
 
-use cargo_mobile::{
+use tauri_mobile::{
   apple::{config::Config as AppleConfig, target::Target},
   env::Env,
   opts::{NoiseLevel, Profile},

+ 2 - 2
tooling/cli/src/mobile/ios/dev.rs

@@ -10,13 +10,13 @@ use crate::{
 };
 use clap::{ArgAction, Parser};
 
-use cargo_mobile::{
+use dialoguer::{theme::ColorfulTheme, Select};
+use tauri_mobile::{
   apple::{config::Config as AppleConfig, teams::find_development_teams},
   config::app::App,
   env::Env,
   opts::{NoiseLevel, Profile},
 };
-use dialoguer::{theme::ColorfulTheme, Select};
 
 use std::env::{set_var, var_os};
 

+ 1 - 1
tooling/cli/src/mobile/ios/open.rs

@@ -1,6 +1,6 @@
 use super::{ensure_init, env, with_config, MobileTarget};
 use crate::Result;
-use cargo_mobile::os;
+use tauri_mobile::os;
 
 pub fn command() -> Result<()> {
   with_config(

+ 8 - 8
tooling/cli/src/mobile/ios/project.rs

@@ -4,7 +4,14 @@
 
 use crate::{helpers::template, Result};
 use anyhow::Context;
-use cargo_mobile::{
+use handlebars::Handlebars;
+use include_dir::{include_dir, Dir};
+use std::{
+  ffi::{OsStr, OsString},
+  fs::{create_dir_all, OpenOptions},
+  path::{Component, PathBuf},
+};
+use tauri_mobile::{
   apple::{
     config::{Config, Metadata},
     deps, rust_version_check,
@@ -15,13 +22,6 @@ use cargo_mobile::{
   target::TargetTrait as _,
   util::{self, cli::TextWrapper},
 };
-use handlebars::Handlebars;
-use include_dir::{include_dir, Dir};
-use std::{
-  ffi::{OsStr, OsString},
-  fs::{create_dir_all, OpenOptions},
-  path::{Component, PathBuf},
-};
 
 const TEMPLATE_DIR: Dir<'_> = include_dir!("templates/mobile/ios");
 

+ 1 - 1
tooling/cli/src/mobile/ios/xcode_script.rs

@@ -2,7 +2,7 @@ use super::{env, with_config};
 use crate::Result;
 use clap::Parser;
 
-use cargo_mobile::{apple::target::Target, opts::Profile, util};
+use tauri_mobile::{apple::target::Target, opts::Profile, util};
 
 use std::{collections::HashMap, ffi::OsStr, path::PathBuf};
 

+ 8 - 8
tooling/cli/src/mobile/mod.rs

@@ -7,12 +7,6 @@ use crate::{
   interface::DevProcess,
 };
 use anyhow::{bail, Result};
-use cargo_mobile::{
-  bossy,
-  config::app::{App, Raw as RawAppConfig},
-  env::Error as EnvError,
-  opts::NoiseLevel,
-};
 use jsonrpsee::client_transport::ws::WsTransportClientBuilder;
 use jsonrpsee::core::client::{Client, ClientBuilder, ClientT};
 use jsonrpsee::rpc_params;
@@ -33,12 +27,18 @@ use std::{
     Arc,
   },
 };
+use tauri_mobile::{
+  bossy,
+  config::app::{App, Raw as RawAppConfig},
+  env::Error as EnvError,
+  opts::NoiseLevel,
+};
 use tokio::runtime::Runtime;
 
 #[cfg(not(windows))]
-use cargo_mobile::env::Env;
+use tauri_mobile::env::Env;
 #[cfg(windows)]
-use cargo_mobile::os::Env;
+use tauri_mobile::os::Env;
 
 pub mod android;
 mod init;