From c18a5ee0d5b9ce73b8dc27d140f2f8bb966e50e5 Mon Sep 17 00:00:00 2001 From: Daniil Anikin <81761954+Heezay@users.noreply.github.com> Date: Tue, 30 Aug 2022 18:56:32 +0300 Subject: [PATCH] Add win latest check (#150) * Fix crossbundle install --preferred problem * Add win latest check * Fix small syntax issue * Alter CI.yml * Fix CI * Fix syntax error * Change ci code * Try to build gradle-apk * Bump version * Fix yml syntax * Fix syntax * Remove unused code * Fix CI * Alter example in CI Co-authored-by: David Ackerman --- .github/workflows/ci.yml | 25 +++++++++++++++++++ Cargo.toml | 6 ++--- crossbundle/cli/Cargo.toml | 6 ++--- crossbundle/cli/src/commands/install/mod.rs | 6 ++++- crossbundle/tools/Cargo.toml | 4 +-- docs/src/crossbow/configuration.md | 2 +- examples/bevy-2d/Cargo.toml | 4 +-- examples/bevy-explorer/Cargo.toml | 4 +-- examples/crossbow-plugins/Cargo.toml | 10 ++++---- examples/macroquad-3d/Cargo.toml | 4 +-- examples/macroquad-permissions/Cargo.toml | 6 ++--- platform/android/Cargo.toml | 2 +- platform/android/java/app/config.gradle | 2 +- platform/ios/Cargo.toml | 2 +- plugins/admob-android/Cargo.toml | 4 +-- plugins/admob-android/README.md | 6 ++--- plugins/admob-android/android/config.gradle | 2 +- plugins/play-billing/Cargo.toml | 4 +-- plugins/play-billing/README.md | 6 ++--- plugins/play-billing/android/config.gradle | 2 +- plugins/play-core/Cargo.toml | 4 +-- plugins/play-core/README.md | 6 ++--- plugins/play-core/android/config.gradle | 2 +- plugins/play-games-services/Cargo.toml | 4 +-- plugins/play-games-services/README.md | 6 ++--- .../play-games-services/android/config.gradle | 2 +- 26 files changed, 80 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc2471c6..347b7df2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,31 @@ jobs: export ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME crossbundle build android -s=native-apk --release + android-build-windows: + name: Build Android example on Windows latest + runs-on: windows-latest + steps: + - uses: actions/checkout@master + - name: Install Android targets and upgrade rust + run: | + rustup upgrade + rustup target add aarch64-linux-android x86_64-linux-android + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: 11 + - name: Install Crossbundle + run: | + cargo install --path=./crossbundle/cli + crossbundle install --preferred + - name: Build APK + run: | + cd examples/macroquad-permissions + setx ANDROID_SDK_ROOT "$HOME/AppData/Local/Android/Sdk" /M + setx ANDROID_NDK_ROOT "$HOME/AppData/Local/Android/Sdk/ndk/23.1.7779620" /M + crossbundle build android --release + apple-build-macos: name: Build Apple example on macOS latest runs-on: macos-latest diff --git a/Cargo.toml b/Cargo.toml index 4347a55f..491b021b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crossbow" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["DodoRare Team "] description = "Cross-Platform build tools and toolkit for games" @@ -21,10 +21,10 @@ apple-bundle = { version = "0.1.4", optional = true } [target.'cfg(target_os = "android")'.dependencies] ndk-glue = "0.7.0" -crossbow-android = { path = "platform/android", version = "0.2.1", optional = true } +crossbow-android = { path = "platform/android", version = "0.2.2", optional = true } [target.'cfg(target_os = "ios")'.dependencies] -crossbow-ios = { path = "platform/ios", version = "0.2.1", optional = true } +crossbow-ios = { path = "platform/ios", version = "0.2.2", optional = true } [patch.crates-io] miniquad = { git = "https://github.com/not-fl3/miniquad", rev = "d67ffe6950cf73df307e2d23aaa4726f14399985" } diff --git a/crossbundle/cli/Cargo.toml b/crossbundle/cli/Cargo.toml index e4504c9e..e486fc86 100644 --- a/crossbundle/cli/Cargo.toml +++ b/crossbundle/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crossbundle" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["DodoRare Team "] description = "Build and publish apps for Android/iOS" @@ -18,8 +18,8 @@ name = "crossbundle" path = "src/main.rs" [dependencies] -crossbow = { path = "../../", version = "0.2.1", default-features = false, features = ["update-manifest"] } -crossbundle-tools = { path = "../tools", version = "0.2.1", default-features = false } +crossbow = { path = "../../", version = "0.2.2", default-features = false, features = ["update-manifest"] } +crossbundle-tools = { path = "../tools", version = "0.2.2", default-features = false } android-tools = { version = "0.2.11", optional = true } clap = { version = "3.2", features = ["derive"] } serde = { version = "1.0", features = ["derive"] } diff --git a/crossbundle/cli/src/commands/install/mod.rs b/crossbundle/cli/src/commands/install/mod.rs index f34d0b1d..06c02b03 100644 --- a/crossbundle/cli/src/commands/install/mod.rs +++ b/crossbundle/cli/src/commands/install/mod.rs @@ -48,7 +48,11 @@ impl InstallCommand { #[cfg(feature = "android")] CommandLineToolsInstallCommand::default().install(config)?; #[cfg(feature = "android")] - BundletoolInstallCommand::default().install(config)?; + BundletoolInstallCommand { + version: String::from("1.8.2"), + ..Default::default() + } + .install(config)?; #[cfg(feature = "android")] SdkManagerInstallCommand { preferred_tools: true, diff --git a/crossbundle/tools/Cargo.toml b/crossbundle/tools/Cargo.toml index 2b814698..9dba4372 100644 --- a/crossbundle/tools/Cargo.toml +++ b/crossbundle/tools/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crossbundle-tools" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["DodoRare Team "] description = "Build and publish apps for Android/iOS" @@ -10,7 +10,7 @@ keywords = ["android", "ios"] readme = "README.md" [dependencies] -crossbow-android = { version = "0.2.1", path = "../../platform/android", default-features = false, features = ["embed"] } +crossbow-android = { version = "0.2.2", path = "../../platform/android", default-features = false, features = ["embed"] } # Apple crates apple-bundle = { version = "0.1.4", optional = true } simctl = { version = "0.1.1", package = "creator-simctl", optional = true } diff --git a/docs/src/crossbow/configuration.md b/docs/src/crossbow/configuration.md index 3c1e9100..d3dbcd5b 100644 --- a/docs/src/crossbow/configuration.md +++ b/docs/src/crossbow/configuration.md @@ -12,7 +12,7 @@ authors = ["Example "] edition = "2021" [dependencies] -crossbow = "0.2.1" +crossbow = "0.2.2" [package.metadata] app_name = "Game" diff --git a/examples/bevy-2d/Cargo.toml b/examples/bevy-2d/Cargo.toml index 629ee2f1..9254814f 100644 --- a/examples/bevy-2d/Cargo.toml +++ b/examples/bevy-2d/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "bevy-2d" -version = "0.2.1" +version = "0.2.2" authors = ["DodoRare Team "] edition = "2021" [dependencies] -crossbow = { version = "0.2.1", path = "../../" } +crossbow = { version = "0.2.2", path = "../../" } log = "0.4" anyhow = "1.0" bevy = { version = "0.8.0", default-features = false, features = ["bevy_winit", "render", "bevy_asset"] } diff --git a/examples/bevy-explorer/Cargo.toml b/examples/bevy-explorer/Cargo.toml index e08a6490..5fb1ba63 100644 --- a/examples/bevy-explorer/Cargo.toml +++ b/examples/bevy-explorer/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "bevy-explorer" -version = "0.2.1" +version = "0.2.2" authors = ["DodoRare Team "] edition = "2021" [dependencies] -crossbow = { version = "0.2.1", path = "../../" } +crossbow = { version = "0.2.2", path = "../../" } log = "0.4" anyhow = "1.0" subxt = "0.21" diff --git a/examples/crossbow-plugins/Cargo.toml b/examples/crossbow-plugins/Cargo.toml index ed4934fa..9c05c917 100644 --- a/examples/crossbow-plugins/Cargo.toml +++ b/examples/crossbow-plugins/Cargo.toml @@ -1,19 +1,19 @@ [package] name = "crossbow-plugins" -version = "0.2.1" +version = "0.2.2" authors = ["DodoRare Team "] edition = "2021" [dependencies] -crossbow = { version = "0.2.1", path = "../../" } +crossbow = { version = "0.2.2", path = "../../" } log = "0.4" anyhow = "1.0" macroquad = "=0.3.7" [target.'cfg(target_os = "android")'.dependencies] -play-core = { version = "0.2.1", path = "../../plugins/play-core" } -play-billing = { version = "0.2.1", path = "../../plugins/play-billing" } -play-games-services = { version = "0.2.1", path = "../../plugins/play-games-services" } +play-core = { version = "0.2.2", path = "../../plugins/play-core" } +play-billing = { version = "0.2.2", path = "../../plugins/play-billing" } +play-games-services = { version = "0.2.2", path = "../../plugins/play-games-services" } [package.metadata] app_name = "Crossbow Plugins" diff --git a/examples/macroquad-3d/Cargo.toml b/examples/macroquad-3d/Cargo.toml index 660f63f7..e2d320b4 100644 --- a/examples/macroquad-3d/Cargo.toml +++ b/examples/macroquad-3d/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "macroquad-3d" -version = "0.2.1" +version = "0.2.2" authors = ["DodoRare Team "] edition = "2021" [dependencies] -crossbow = { version = "0.2.1", path = "../../" } +crossbow = { version = "0.2.2", path = "../../" } log = "0.4" anyhow = "1.0" macroquad = "=0.3.7" diff --git a/examples/macroquad-permissions/Cargo.toml b/examples/macroquad-permissions/Cargo.toml index f3833646..5ca69e4f 100644 --- a/examples/macroquad-permissions/Cargo.toml +++ b/examples/macroquad-permissions/Cargo.toml @@ -1,17 +1,17 @@ [package] name = "macroquad-permissions" -version = "0.2.1" +version = "0.2.2" authors = ["DodoRare Team "] edition = "2021" [dependencies] -crossbow = { version = "0.2.1", path = "../../" } +crossbow = { version = "0.2.2", path = "../../" } log = "0.4" anyhow = "1.0" macroquad = "=0.3.7" [target.'cfg(target_os = "android")'.dependencies] -admob-android = { version = "0.2.1", path = "../../plugins/admob-android" } +admob-android = { version = "0.2.2", path = "../../plugins/admob-android" } [package.metadata] app_name = "Permissions" diff --git a/platform/android/Cargo.toml b/platform/android/Cargo.toml index c649bb12..f017243b 100644 --- a/platform/android/Cargo.toml +++ b/platform/android/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crossbow-android" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["DodoRare Team "] description = "Cross-Platform build tools and toolkit for games" diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle index 166b4a8f..b4aa714a 100644 --- a/platform/android/java/app/config.gradle +++ b/platform/android/java/app/config.gradle @@ -1,5 +1,5 @@ ext.versions = [ - crossbowLibrary : "0.2.1", + crossbowLibrary : "0.2.2", androidGradlePlugin: "7.0.0", compileSdk : 31, minSdk : 19, diff --git a/platform/ios/Cargo.toml b/platform/ios/Cargo.toml index 27323d38..7ca1ad2f 100644 --- a/platform/ios/Cargo.toml +++ b/platform/ios/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crossbow-ios" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["DodoRare Team "] description = "Cross-Platform build tools and toolkit for games" diff --git a/plugins/admob-android/Cargo.toml b/plugins/admob-android/Cargo.toml index d89678ee..30fcf02f 100644 --- a/plugins/admob-android/Cargo.toml +++ b/plugins/admob-android/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "admob-android" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["DodoRare Team "] description = "AdMob Plugin for Crossbow" @@ -11,4 +11,4 @@ readme = "README.md" exclude = ["android/"] [dependencies] -crossbow-android = { path = "../../platform/android", version = "0.2.1" } +crossbow-android = { path = "../../platform/android", version = "0.2.2" } diff --git a/plugins/admob-android/README.md b/plugins/admob-android/README.md index d9646e4f..10f94675 100644 --- a/plugins/admob-android/README.md +++ b/plugins/admob-android/README.md @@ -27,16 +27,16 @@ Just add Rust dependencies like this: ```toml [dependencies] -crossbow = "0.2.1" +crossbow = "0.2.2" [target.'cfg(target_os = "android")'.dependencies] -admob-android = "0.2.1" +admob-android = "0.2.2" ``` And finally, add this to your Crossbow Android configuration: ```toml [package.metadata.android] -plugins_remote = ["com.crossbow.admob:admob:0.2.1"] +plugins_remote = ["com.crossbow.admob:admob:0.2.2"] ``` > That's it, now you can start using AdMob ads! diff --git a/plugins/admob-android/android/config.gradle b/plugins/admob-android/android/config.gradle index 0145cec6..e4d3efba 100644 --- a/plugins/admob-android/android/config.gradle +++ b/plugins/admob-android/android/config.gradle @@ -1,5 +1,5 @@ ext.versions = [ - crossbowLibrary : "0.2.1", + crossbowLibrary : "0.2.2", androidGradlePlugin: "7.0.0", compileSdk : 31, minSdk : 19, diff --git a/plugins/play-billing/Cargo.toml b/plugins/play-billing/Cargo.toml index ee03a344..c6eba384 100644 --- a/plugins/play-billing/Cargo.toml +++ b/plugins/play-billing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "play-billing" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["DodoRare Team "] description = "Google Play Billing Plugin for Crossbow" @@ -11,4 +11,4 @@ readme = "README.md" exclude = ["android/"] [dependencies] -crossbow-android = { path = "../../platform/android", version = "0.2.1" } +crossbow-android = { path = "../../platform/android", version = "0.2.2" } diff --git a/plugins/play-billing/README.md b/plugins/play-billing/README.md index b0bc47f4..ad276eaf 100644 --- a/plugins/play-billing/README.md +++ b/plugins/play-billing/README.md @@ -17,16 +17,16 @@ Just add Rust dependencies like this: ```toml [dependencies] -crossbow = "0.2.1" +crossbow = "0.2.2" [target.'cfg(target_os = "android")'.dependencies] -play-billing = "0.2.1" +play-billing = "0.2.2" ``` And finally, add this to your Crossbow Android configuration: ```toml [package.metadata.android] -plugins_remote = ["com.crossbow.play_billing:play_billing:0.2.1"] +plugins_remote = ["com.crossbow.play_billing:play_billing:0.2.2"] ``` > That's it, now you can start using Play Billing! diff --git a/plugins/play-billing/android/config.gradle b/plugins/play-billing/android/config.gradle index 0145cec6..e4d3efba 100644 --- a/plugins/play-billing/android/config.gradle +++ b/plugins/play-billing/android/config.gradle @@ -1,5 +1,5 @@ ext.versions = [ - crossbowLibrary : "0.2.1", + crossbowLibrary : "0.2.2", androidGradlePlugin: "7.0.0", compileSdk : 31, minSdk : 19, diff --git a/plugins/play-core/Cargo.toml b/plugins/play-core/Cargo.toml index 59c1dd76..461e365f 100644 --- a/plugins/play-core/Cargo.toml +++ b/plugins/play-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "play-core" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["DodoRare Team "] description = "Google Play Core Plugin for Crossbow" @@ -11,4 +11,4 @@ readme = "README.md" exclude = ["android/"] [dependencies] -crossbow-android = { path = "../../platform/android", version = "0.2.1" } +crossbow-android = { path = "../../platform/android", version = "0.2.2" } diff --git a/plugins/play-core/README.md b/plugins/play-core/README.md index 776ae335..0ab2c062 100644 --- a/plugins/play-core/README.md +++ b/plugins/play-core/README.md @@ -17,16 +17,16 @@ Just add Rust dependencies like this: ```toml [dependencies] -crossbow = "0.2.1" +crossbow = "0.2.2" [target.'cfg(target_os = "android")'.dependencies] -play-core = "0.2.1" +play-core = "0.2.2" ``` And finally, add this to your Crossbow Android configuration: ```toml [package.metadata.android] -plugins_remote = ["com.crossbow.play_core:play_core:0.2.1"] +plugins_remote = ["com.crossbow.play_core:play_core:0.2.2"] ``` > That's it, now you can start using Play Core! diff --git a/plugins/play-core/android/config.gradle b/plugins/play-core/android/config.gradle index 0145cec6..e4d3efba 100644 --- a/plugins/play-core/android/config.gradle +++ b/plugins/play-core/android/config.gradle @@ -1,5 +1,5 @@ ext.versions = [ - crossbowLibrary : "0.2.1", + crossbowLibrary : "0.2.2", androidGradlePlugin: "7.0.0", compileSdk : 31, minSdk : 19, diff --git a/plugins/play-games-services/Cargo.toml b/plugins/play-games-services/Cargo.toml index 1da18c5e..0ada005d 100644 --- a/plugins/play-games-services/Cargo.toml +++ b/plugins/play-games-services/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "play-games-services" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["DodoRare Team "] description = "Google Play Games Services Plugin for Crossbow" @@ -11,4 +11,4 @@ readme = "README.md" exclude = ["android/"] [dependencies] -crossbow-android = { path = "../../platform/android", version = "0.2.1" } +crossbow-android = { path = "../../platform/android", version = "0.2.2" } diff --git a/plugins/play-games-services/README.md b/plugins/play-games-services/README.md index 04db2859..6c7b1f50 100644 --- a/plugins/play-games-services/README.md +++ b/plugins/play-games-services/README.md @@ -29,16 +29,16 @@ Just add Rust dependencies like this: ```toml [dependencies] -crossbow = "0.2.1" +crossbow = "0.2.2" [target.'cfg(target_os = "android")'.dependencies] -play-games-services = "0.2.1" +play-games-services = "0.2.2" ``` And finally, add this to your Crossbow Android configuration: ```toml [package.metadata.android] -plugins_remote = ["com.crossbow.play_games_services:play_games_services:0.2.1"] +plugins_remote = ["com.crossbow.play_games_services:play_games_services:0.2.2"] ``` ## Getting started diff --git a/plugins/play-games-services/android/config.gradle b/plugins/play-games-services/android/config.gradle index 0145cec6..e4d3efba 100644 --- a/plugins/play-games-services/android/config.gradle +++ b/plugins/play-games-services/android/config.gradle @@ -1,5 +1,5 @@ ext.versions = [ - crossbowLibrary : "0.2.1", + crossbowLibrary : "0.2.2", androidGradlePlugin: "7.0.0", compileSdk : 31, minSdk : 19,