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

refactor(build): change tauri-api dependency path to skip rebuilds (#6490)

* refactor(build): change tauri-api dependency path to skip rebuilds

The tauri-api Swift package cannot be injected inside the iOS plugin project because swift-rs reruns when the project folder changes. We will now inject the project in the parent folder instead.

* revert tauri-plugin-log [skip ci]
Lucas Fernandes Nogueira 2 жил өмнө
parent
commit
56b528e481

+ 1 - 1
core/tauri-build/src/mobile.rs

@@ -79,7 +79,7 @@ impl PluginBuilder {
 
           copy_folder(
             Path::new(&tauri_library_path),
-            &path.join("tauri-api"),
+            &path.parent().unwrap().join("tauri-api"),
             &[".build", "Package.resolved", "Tests"],
           )
           .context("failed to copy tauri-api to the plugin project")?;

+ 1 - 0
examples/api/src-tauri/tauri-plugin-sample/.gitignore

@@ -0,0 +1 @@
+/tauri-api

+ 0 - 1
examples/api/src-tauri/tauri-plugin-sample/ios/.gitignore

@@ -8,4 +8,3 @@ DerivedData/
 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
 .netrc
 Package.resolved
-/tauri-api

+ 1 - 0
tooling/cli/templates/plugin/.gitignore

@@ -8,6 +8,7 @@ package-lock.json
 .vscode/settings.json
 yarn.lock
 
+/tauri-api
 /target
 Cargo.lock
 node_modules/

+ 0 - 1
tooling/cli/templates/plugin/ios/.gitignore

@@ -8,4 +8,3 @@ DerivedData/
 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
 .netrc
 Package.resolved
-/tauri-api