Browse Source

feat(core): include mobile on docs.rs targets (#8006)

Lucas Fernandes Nogueira 1 năm trước cách đây
mục cha
commit
46dcb94110

+ 6 - 0
.changes/mobile-docs.md

@@ -0,0 +1,6 @@
+---
+"tauri": patch:enhance
+"tauri-runtime": patch:enhance
+---
+
+Include mobile on docs.rs targets.

+ 3 - 1
core/tauri-runtime/Cargo.toml

@@ -19,7 +19,9 @@ default-target = "x86_64-unknown-linux-gnu"
 targets = [
   "x86_64-pc-windows-msvc",
   "x86_64-unknown-linux-gnu",
-  "x86_64-apple-darwin"
+  "x86_64-apple-darwin",
+  "x86_64-linux-android",
+  "x86_64-apple-ios"
 ]
 
 [dependencies]

+ 3 - 1
core/tauri/Cargo.toml

@@ -30,7 +30,9 @@ default-target = "x86_64-unknown-linux-gnu"
 targets = [
   "x86_64-pc-windows-msvc",
   "x86_64-unknown-linux-gnu",
-  "x86_64-apple-darwin"
+  "x86_64-apple-darwin",
+  "x86_64-linux-android",
+  "x86_64-apple-ios"
 ]
 
 [package.metadata.cargo-udeps.ignore]

+ 3 - 3
core/tauri/src/test/mock_runtime.rs

@@ -160,9 +160,9 @@ impl<T: UserEvent> RuntimeHandle<T> for MockRuntimeHandle {
 
   #[cfg(target_os = "android")]
   fn find_class<'a>(
-    &'a self,
-    env: &'a mut jni::JNIEnv<'a>,
-    activity: &'a jni::objects::JObject<'a>,
+    &self,
+    env: &mut jni::JNIEnv<'a>,
+    activity: &jni::objects::JObject<'_>,
     name: impl Into<String>,
   ) -> std::result::Result<jni::objects::JClass<'a>, jni::errors::Error> {
     todo!()