From 7f6bdf89915c1226a7f481721b7f6ee043e78a9c Mon Sep 17 00:00:00 2001 From: Sergio Ribera Date: Wed, 28 Jun 2023 13:21:01 -0400 Subject: [PATCH] fix: remove patch for android activity --- README.md | 13 ------- examples/multiple_joysticks_mobile/Cargo.lock | 7 ++-- examples/multiple_joysticks_mobile/Cargo.toml | 20 ----------- examples/simple_mobile/Cargo.lock | 35 +++++++++++++++---- examples/simple_mobile/Cargo.toml | 20 ----------- 5 files changed, 33 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index de860b2..ebcafe0 100644 --- a/README.md +++ b/README.md @@ -63,11 +63,6 @@ Add to Cargo.toml bevy = "0.10.1" virtual_joystick = "*" # Add your version ``` -To solve [sizing issue](#user-content-issues) -``` -[patch.crates-io] -android-activity = { git = "https://github.com/rust-mobile/android-activity", rev = "79e03e08fbf70e374cb88d8ef8c89acaa006bbfc" } -``` The minimal requirement: ```rust @@ -259,13 +254,5 @@ struct VirtualJoystickBundle { } ``` -# Issues -- [Sizing problem between desktop and mobile (UI/2D)](https://github.com/bevyengine/bevy/issues/8322) - > **Note**: Temporary solution, add this to your Cargo.toml - ```rs - [patch.crates-io] - android-activity = { git = "https://github.com/rust-mobile/android-activity", rev = "79e03e08fbf70e374cb88d8ef8c89acaa006bbfc" } - ``` - # TODOs - Add more better documentation diff --git a/examples/multiple_joysticks_mobile/Cargo.lock b/examples/multiple_joysticks_mobile/Cargo.lock index 17f500d..394e2c4 100644 --- a/examples/multiple_joysticks_mobile/Cargo.lock +++ b/examples/multiple_joysticks_mobile/Cargo.lock @@ -130,8 +130,9 @@ dependencies = [ [[package]] name = "android-activity" -version = "0.4.1" -source = "git+https://github.com/rust-mobile/android-activity?rev=79e03e08fbf70e374cb88d8ef8c89acaa006bbfc#79e03e08fbf70e374cb88d8ef8c89acaa006bbfc" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40bc1575e653f158cbdc6ebcd917b9564e66321c5325c232c3591269c257be69" dependencies = [ "android-properties", "bitflags", @@ -2959,7 +2960,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "virtual_joystick" -version = "1.1.0" +version = "1.1.1" dependencies = [ "bevy", "serde", diff --git a/examples/multiple_joysticks_mobile/Cargo.toml b/examples/multiple_joysticks_mobile/Cargo.toml index 042f720..f72575c 100644 --- a/examples/multiple_joysticks_mobile/Cargo.toml +++ b/examples/multiple_joysticks_mobile/Cargo.toml @@ -10,23 +10,3 @@ crate-type = ["staticlib", "cdylib"] [dependencies] bevy = "0.10.1" virtual_joystick = { path = "../../" } - -[package.metadata.android] -package = "com.sergioribera.multiple_joysticks" -apk_name = "Multiple_Joysticks" -assets = "./assets" -resources = "./assets/android-res" -build_targets = ["aarch64-linux-android", "armv7-linux-androideabi"] - -[package.metadata.android.sdk] -target_sdk_version = 31 - -[package.metadata.android.application] -icon = "@mipmap/ic_launcher" -label = "Multiple Joystick" - -# -# Important: this solve the [issue](https://github.com/bevyengine/bevy/issues/8322) -# -[patch.crates-io] -android-activity = { git = "https://github.com/rust-mobile/android-activity", rev = "79e03e08fbf70e374cb88d8ef8c89acaa006bbfc" } diff --git a/examples/simple_mobile/Cargo.lock b/examples/simple_mobile/Cargo.lock index 306f92d..25e7095 100644 --- a/examples/simple_mobile/Cargo.lock +++ b/examples/simple_mobile/Cargo.lock @@ -130,8 +130,9 @@ dependencies = [ [[package]] name = "android-activity" -version = "0.4.1" -source = "git+https://github.com/MarijnS95/android-activity/?branch=na-resize#20212a6d0cb9ae93553fcfe03921d040b7f16817" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40bc1575e653f158cbdc6ebcd917b9564e66321c5325c232c3591269c257be69" dependencies = [ "android-properties", "bitflags", @@ -142,7 +143,7 @@ dependencies = [ "ndk", "ndk-context", "ndk-sys", - "num_enum", + "num_enum 0.6.1", ] [[package]] @@ -2041,7 +2042,7 @@ dependencies = [ "bitflags", "jni-sys", "ndk-sys", - "num_enum", + "num_enum 0.5.11", "raw-window-handle", "thiserror", ] @@ -2178,7 +2179,16 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", ] [[package]] @@ -2193,6 +2203,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.13", +] + [[package]] name = "objc" version = "0.2.7" @@ -2938,9 +2960,10 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "virtual_joystick" -version = "1.0.3" +version = "1.1.1" dependencies = [ "bevy", + "serde", ] [[package]] diff --git a/examples/simple_mobile/Cargo.toml b/examples/simple_mobile/Cargo.toml index 72c8f9a..968c536 100644 --- a/examples/simple_mobile/Cargo.toml +++ b/examples/simple_mobile/Cargo.toml @@ -10,23 +10,3 @@ crate-type = ["staticlib", "cdylib"] [dependencies] bevy = "0.10.1" virtual_joystick = { path = "../../" } - -[package.metadata.android] -package = "com.sergioribera.simple" -apk_name = "Simple_Joystick" -assets = "./assets" -resources = "./assets/android-res" -build_targets = ["aarch64-linux-android", "armv7-linux-androideabi"] - -[package.metadata.android.sdk] -target_sdk_version = 31 - -[package.metadata.android.application] -icon = "@mipmap/ic_launcher" -label = "Simple Joystick" - -# -# Important: this solve the [issue](https://github.com/bevyengine/bevy/issues/8322) -# -[patch.crates-io] -android-activity = { git = "https://github.com/rust-mobile/android-activity", rev = "79e03e08fbf70e374cb88d8ef8c89acaa006bbfc" }