fix: adjust Cargo features to fix android build (#375)

pull/379/head
Lucas Fernandes Nogueira 2 years ago committed by GitHub
parent ba4ef9a037
commit fdec66c69f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -140,7 +140,7 @@ jobs:
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev
- name: install openssl
if: ${{ matrix.platform == 'windows-latest' && matrix.package == 'tauri-plugin-authenticator' }}
if: ${{ matrix.platform == 'windows-latest' && contains(fromJSON('["tauri-plugin-http", "tauri-plugin-upload", "tauri-plugin-updater", "tauri-plugin-websocket", "tauri-plugin-authenticator"]'), matrix.package) }}
run: |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
vcpkg install openssl:x64-windows-static-md

60
Cargo.lock generated

@ -2254,15 +2254,15 @@ dependencies = [
[[package]]
name = "hyper-rustls"
version = "0.23.2"
version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c"
checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7"
dependencies = [
"http",
"hyper",
"rustls",
"rustls 0.21.1",
"tokio",
"tokio-rustls",
"tokio-rustls 0.24.0",
]
[[package]]
@ -4013,9 +4013,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "reqwest"
version = "0.11.16"
version = "0.11.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27b71749df584b7f4cac2c426c127a7c785a5106cc98f7a8feb044115f0fa254"
checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55"
dependencies = [
"base64 0.21.0",
"bytes 1.4.0",
@ -4037,14 +4037,14 @@ dependencies = [
"once_cell",
"percent-encoding",
"pin-project-lite",
"rustls",
"rustls 0.21.1",
"rustls-pemfile",
"serde",
"serde_json",
"serde_urlencoded",
"tokio",
"tokio-native-tls",
"tokio-rustls",
"tokio-rustls 0.24.0",
"tokio-util",
"tower-service",
"url",
@ -4169,6 +4169,18 @@ dependencies = [
"webpki",
]
[[package]]
name = "rustls"
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c911ba11bc8433e811ce56fde130ccf32f5127cab0e0194e9c68c5a5b671791e"
dependencies = [
"log",
"ring",
"rustls-webpki",
"sct",
]
[[package]]
name = "rustls-pemfile"
version = "1.0.2"
@ -4178,6 +4190,16 @@ dependencies = [
"base64 0.21.0",
]
[[package]]
name = "rustls-webpki"
version = "0.100.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b"
dependencies = [
"ring",
"untrusted",
]
[[package]]
name = "rustversion"
version = "1.0.12"
@ -4637,7 +4659,7 @@ dependencies = [
"percent-encoding",
"rand 0.8.5",
"rsa",
"rustls",
"rustls 0.20.8",
"rustls-pemfile",
"serde",
"serde_json",
@ -4683,7 +4705,7 @@ checksum = "804d3f245f894e61b1e6263c84b23ca675d96753b5abfd5cc8597d86806e8024"
dependencies = [
"once_cell",
"tokio",
"tokio-rustls",
"tokio-rustls 0.23.4",
]
[[package]]
@ -5725,11 +5747,21 @@ version = "0.23.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
dependencies = [
"rustls",
"rustls 0.20.8",
"tokio",
"webpki",
]
[[package]]
name = "tokio-rustls"
version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5"
dependencies = [
"rustls 0.21.1",
"tokio",
]
[[package]]
name = "tokio-stream"
version = "0.1.12"
@ -5763,10 +5795,10 @@ dependencies = [
"futures-util",
"log",
"native-tls",
"rustls",
"rustls 0.20.8",
"tokio",
"tokio-native-tls",
"tokio-rustls",
"tokio-rustls 0.23.4",
"tungstenite",
"webpki",
"webpki-roots",
@ -5926,7 +5958,7 @@ dependencies = [
"log",
"native-tls",
"rand 0.8.5",
"rustls",
"rustls 0.20.8",
"sha1",
"thiserror",
"url",

@ -22,7 +22,7 @@ tauri-plugin-log = { path = "../../../plugins/log", version = "1.0.0" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "1.0.0" }
tauri-plugin-clipboard = { path = "../../../plugins/clipboard", version = "1.0.0" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "1.0.0" }
tauri-plugin-http = { path = "../../../plugins/http", version = "1.0.0", features = [ "multipart" ] }
tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "1.0.0" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "1.0.0", features = [ "windows7-compat" ] }
tauri-plugin-os = { path = "../../../plugins/os", version = "1.0.0" }
tauri-plugin-process = { path = "../../../plugins/process", version = "1.0.0" }
@ -37,7 +37,7 @@ features = [
"isolation",
"macos-private-api",
"system-tray",
"protocol-asset"
"protocol-asset",
]
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]

@ -21,7 +21,7 @@ open class RustPlugin : Plugin<Project> {
val abiList = (findProperty("abiList") as? String)?.split(',') ?: defaultAbiList
val defaultArchList = listOf("arm64", "arm", "x86", "x86_64");
val archList = (findProperty("archList") as? String)?.split(',') ?: listOf("arm64", "arm", "x86", "x86_64")
val archList = (findProperty("archList") as? String)?.split(',') ?: defaultArchList
val targetsList = (findProperty("targetList") as? String)?.split(',') ?: listOf("aarch64", "armv7", "i686", "x86_64")

@ -69,6 +69,7 @@ impl<R: Runtime> Dialog<R> {
/// Initializes the plugin.
pub fn init<R: Runtime>() -> TauriPlugin<R> {
#[allow(unused_mut)]
let mut builder = Builder::new("dialog");
// Dialogs are implemented natively on Android

@ -19,7 +19,6 @@ http = "0.2"
reqwest = { version = "0.11", default-features = false, features = [ "json", "stream" ] }
[features]
default = [ "native-tls-vendored" ]
multipart = [ "reqwest/multipart" ]
native-tls = [ "reqwest/native-tls" ]
native-tls-vendored = [ "reqwest/native-tls-vendored" ]

@ -21,7 +21,6 @@ time = "0.3"
tokio = { version = "1", features = ["sync"] }
[features]
default = [ "sqlite" ]
sqlite = ["sqlx/sqlite"]
mysql = ["sqlx/mysql"]
postgres = ["sqlx/postgres"]

@ -35,7 +35,6 @@ mockito = "0.31"
tokio-test = "0.4.2"
[features]
default = [ "native-tls-vendored" ]
native-tls = [ "reqwest/native-tls" ]
native-tls-vendored = [ "reqwest/native-tls-vendored" ]
rustls-tls = [ "reqwest/rustls-tls" ]

@ -17,12 +17,11 @@ log = { workspace = true }
thiserror = { workspace = true }
tokio = { version = "1", features = [ "fs" ] }
tokio-util = { version = "0.7", features = [ "codec" ] }
reqwest = { version = "0.11", features = [ "json", "stream" ] }
reqwest = { version = "0.11", default-features = false, features = [ "json", "stream" ] }
futures-util = "0.3"
read-progress-stream = "1.0.0"
[features]
default = [ "native-tls-vendored" ]
native-tls = [ "reqwest/native-tls" ]
native-tls-vendored = [ "reqwest/native-tls-vendored" ]
rustls-tls = [ "reqwest/rustls-tls" ]

@ -18,10 +18,9 @@ thiserror = { workspace = true }
rand = "0.8"
futures-util = "0.3"
tokio = { version = "1", features = ["net", "sync"] }
tokio-tungstenite = { version = "0.18", features = ["native-tls"] }
tokio-tungstenite = { version = "0.18" }
[features]
default = [ "native-tls-vendored" ]
native-tls = [ "tokio-tungstenite/native-tls" ]
native-tls-vendored = [ "tokio-tungstenite/native-tls-vendored" ]
rustls-tls-webpki-roots = [ "tokio-tungstenite/rustls-tls-webpki-roots" ]

Loading…
Cancel
Save