build.rs 665 B

12345678910111213141516171819202122232425262728
  1. // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
  2. // SPDX-License-Identifier: Apache-2.0
  3. // SPDX-License-Identifier: MIT
  4. use std::process::exit;
  5. use tauri_build::{
  6. mobile::PluginBuilder,
  7. plugin::{set_manifest, Manifest, ScopeType},
  8. };
  9. fn main() {
  10. if let Err(error) = PluginBuilder::new()
  11. .android_path("android")
  12. .ios_path("ios")
  13. .run()
  14. {
  15. println!("{error:#}");
  16. exit(1);
  17. }
  18. set_manifest(
  19. Manifest::new("sample")
  20. .default_capability(include_str!("capabilities/default.json"))
  21. .capability(include_str!("capabilities/ping.json"))
  22. .feature("ping")
  23. .scope_type(ScopeType::String),
  24. );
  25. }