mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-24 17:20:51 +02:00
feat: build docs.rs documentation for Android (#654)
This commit is contained in:
committed by
GitHub
parent
5de23e79f9
commit
d1b7c2c1fb
@@ -5,10 +5,15 @@ description = "Native system dialogs for opening and saving files along with mes
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
links = "tauri-plugin-dialog"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = [ "tauri/dox" ]
|
||||
features = [ "dox" ]
|
||||
targets = [
|
||||
"x86_64-unknown-linux-gnu",
|
||||
"x86_64-linux-android"
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
serde = { workspace = true }
|
||||
@@ -27,3 +32,6 @@ raw-window-handle = "0.5"
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { workspace = true }
|
||||
|
||||
[features]
|
||||
dox = [ "tauri/dox" ]
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use std::process::exit;
|
||||
|
||||
fn main() {
|
||||
if let Err(error) = tauri_build::mobile::PluginBuilder::new()
|
||||
.android_path("android")
|
||||
@@ -11,6 +9,9 @@ fn main() {
|
||||
.run()
|
||||
{
|
||||
println!("{error:#}");
|
||||
exit(1);
|
||||
// when building documentation for Android the plugin build result is irrelevant to the crate itself
|
||||
if !(cfg!(feature = "dox") && std::env::var("TARGET").unwrap().contains("android")) {
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ pub struct MessageDialogBuilder<R: Runtime> {
|
||||
#[cfg(mobile)]
|
||||
#[derive(Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct MessageDialogPayload<'a> {
|
||||
pub(crate) struct MessageDialogPayload<'a> {
|
||||
title: &'a String,
|
||||
message: &'a String,
|
||||
kind: &'a MessageDialogKind,
|
||||
@@ -272,7 +272,7 @@ pub struct FileDialogBuilder<R: Runtime> {
|
||||
#[cfg(mobile)]
|
||||
#[derive(Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct FileDialogPayload<'a> {
|
||||
pub(crate) struct FileDialogPayload<'a> {
|
||||
filters: &'a Vec<Filter>,
|
||||
multiple: bool,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user