diff --git a/Cargo.lock b/Cargo.lock index 960a7707f..75e6d8c0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -506,6 +506,7 @@ dependencies = [ "async-lock", "bitwarden", "bitwarden-crypto", + "bitwarden-generators", "chrono", "env_logger", "schemars", diff --git a/crates/bitwarden-uniffi/Cargo.toml b/crates/bitwarden-uniffi/Cargo.toml index eadaaf8d2..6dc940062 100644 --- a/crates/bitwarden-uniffi/Cargo.toml +++ b/crates/bitwarden-uniffi/Cargo.toml @@ -25,6 +25,9 @@ bitwarden = { path = "../bitwarden", features = ["mobile", "internal"] } bitwarden-crypto = { path = "../bitwarden-crypto", version = "=0.1.0", features = [ "mobile", ] } +bitwarden-generators = { path = "../bitwarden-generators", version = "=0.1.0", features = [ + "mobile", +] } [build-dependencies] uniffi = { version = "=0.25.2", features = ["build"] } diff --git a/crates/bitwarden/src/tool/client_generator.rs b/crates/bitwarden/src/tool/client_generator.rs index bf7c66ef3..c21eeb929 100644 --- a/crates/bitwarden/src/tool/client_generator.rs +++ b/crates/bitwarden/src/tool/client_generator.rs @@ -1,6 +1,7 @@ -use bitwarden_generators::{ - passphrase, password, username, PassphraseGeneratorRequest, PasswordGeneratorRequest, - UsernameGeneratorRequest, +use bitwarden_generators::{passphrase, password, username}; + +use crate::generators::{ + PassphraseGeneratorRequest, PasswordGeneratorRequest, UsernameGeneratorRequest, }; use crate::{error::Result, Client}; diff --git a/languages/kotlin/app/src/main/java/com/bitwarden/myapplication/MainActivity.kt b/languages/kotlin/app/src/main/java/com/bitwarden/myapplication/MainActivity.kt index dd79ff870..f51d0309e 100644 --- a/languages/kotlin/app/src/main/java/com/bitwarden/myapplication/MainActivity.kt +++ b/languages/kotlin/app/src/main/java/com/bitwarden/myapplication/MainActivity.kt @@ -27,9 +27,9 @@ import com.bitwarden.core.Folder import com.bitwarden.core.InitOrgCryptoRequest import com.bitwarden.core.InitUserCryptoMethod import com.bitwarden.core.InitUserCryptoRequest -import com.bitwarden.core.Kdf import com.bitwarden.core.Uuid import com.bitwarden.crypto.HashPurpose +import com.bitwarden.crypto.Kdf import com.bitwarden.myapplication.ui.theme.MyApplicationTheme import com.bitwarden.sdk.Client import io.ktor.client.HttpClient diff --git a/languages/swift/build.sh b/languages/swift/build.sh index 87f9cecdb..69bc9a881 100755 --- a/languages/swift/build.sh +++ b/languages/swift/build.sh @@ -28,16 +28,12 @@ cargo run -p uniffi-bindgen generate \ --out-dir tmp/bindings # Move generated swift bindings -mv ./tmp/bindings/BitwardenCore.swift ./Sources/BitwardenSdk/ -mv ./tmp/bindings/BitwardenCrypto.swift ./Sources/BitwardenSdk/ -mv ./tmp/bindings/BitwardenSDK.swift ./Sources/BitwardenSdk/ +mv ./tmp/bindings/*.swift ./Sources/BitwardenSdk/ # Massage the generated files to fit xcframework mkdir tmp/Headers -mv ./tmp/bindings/BitwardenCoreFFI.h ./tmp/Headers/ -mv ./tmp/bindings/BitwardenCryptoFFI.h ./tmp/Headers/ -mv ./tmp/bindings/BitwardenFFI.h ./tmp/Headers/ -cat ./tmp/bindings/BitwardenFFI.modulemap ./tmp/bindings/BitwardenCoreFFI.modulemap ./tmp/bindings/BitwardenCryptoFFI.modulemap > ./tmp/Headers/module.modulemap +mv ./tmp/bindings/*.h ./tmp/Headers/ +cat ./tmp/bindings/*.modulemap > ./tmp/Headers/module.modulemap # Build xcframework xcodebuild -create-xcframework \