Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create single Permission API inside Cargo.toml metadata #121

Merged
merged 24 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
21f26de
Bump android manifest version and replace Cargo.toml metadata
enfipy Jul 27, 2022
3b7aa7b
[errors] Alter commands, refactor
enfipy Aug 1, 2022
9eaf66a
Alter assets folders
enfipy Aug 1, 2022
0bcf6cf
Alter build targets
enfipy Aug 2, 2022
0aec1e6
Alter docs, add Android and iOS strategies, fix test
enfipy Aug 2, 2022
8c6fd94
Fix iOS icons bug, alter icons and splash screen, fix iOS Info.plist …
enfipy Aug 2, 2022
29330f9
Fix cargo metadata test
enfipy Aug 3, 2022
823d8ea
Refacto android command
enfipy Aug 3, 2022
ff5c1c9
Fix macroquad permissions, refactor errors, remove redundant code
enfipy Aug 3, 2022
58f9359
Fix warnings in AdMob plugin and PermissionsUtil (#129)
Adoka3710 Aug 3, 2022
6e4c7f3
Add cross-platform permission API in Metadata
enfipy Aug 3, 2022
4d0acc0
Fix CI build
enfipy Aug 3, 2022
b436cb8
Bump versions
enfipy Aug 3, 2022
6e72045
Bump version of apple-bundle
enfipy Aug 3, 2022
dba8005
Small doc fix
Heezay Aug 4, 2022
7a78050
Reorganize tools structure (#132)
Heezay Aug 4, 2022
1b1ba90
Alter description and move rustfmt
enfipy Aug 4, 2022
6b239ea
Fix fmt
enfipy Aug 4, 2022
df02215
Remove log command and add log flag
enfipy Aug 4, 2022
97f351b
Fixes #130, fixes some warnings in AdMob and Crossbow Android
enfipy Aug 4, 2022
e11f17d
Closes #102, alter folders in crossbundle-tools, alter features
enfipy Aug 4, 2022
71db462
Add icon tmp solution
enfipy Aug 4, 2022
f335158
Remove icons to fix CI
enfipy Aug 4, 2022
2207e61
Update some documentation
enfipy Aug 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .github/assets/splash.png
Binary file not shown.
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: |
cd examples/macroquad-3d
export ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME
crossbundle build android --apk --quad --release
crossbundle build android -s=native-apk --release

apple-build-macos:
name: Build Apple example on macOS latest
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Build Apple app
run: |
cd examples/macroquad-3d
crossbundle build apple --release --target=aarch64-apple-ios --quad
crossbundle build ios --release --target=aarch64-apple-ios

test-crossbundle-new:
name: Generate and Build from template on macOS latest
Expand All @@ -66,7 +66,7 @@ jobs:
- name: Build Apple app
run: |
cd ~/example/
crossbundle build android --apk --release --quad
crossbundle build android -s=native-apk --release

build-example-in-docker:
name: Build Crossbundle Example from Docker
Expand All @@ -77,7 +77,7 @@ jobs:
run: docker build -t tmp -f .github/docker/crossbundle.Dockerfile .
- name: Build Crossbundle Example
run: |
docker run --rm -v "$(pwd)/:/src" -w /src/examples/macroquad-permissions tmp build android --quad --release
docker run --rm -v "$(pwd)/:/src" -w /src/examples/macroquad-permissions tmp build android --release

clean:
name: Check code format
Expand All @@ -91,14 +91,13 @@ jobs:
components: rustfmt, clippy
override: true
- name: Check the format
run: cargo +nightly fmt --all -- --check
run: |
cd crossbundle/cli/
cargo +nightly fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings -A clippy::unnecessary-unwrap -A clippy::too-many-arguments
# Blocked by https://github.com/rust-lang/rust/issues/99261
# - name: Run clippy on crossbundle
# run: |
# cd crossbundle/cli
# cargo clippy --all-targets --all-features -- -D warnings -A clippy::unnecessary-unwrap -A clippy::too-many-arguments
run: |
cd crossbundle/cli/
cargo clippy --all-targets --all-features -- -D warnings -A clippy::unnecessary-unwrap -A clippy::too-many-arguments
- name: Check for deadlinks
run: |
cargo install cargo-deadlinks
Expand Down
15 changes: 10 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "crossbow"
version = "0.1.7"
version = "0.1.8"
edition = "2021"
authors = ["DodoRare Team <support@dodorare.com>"]
description = "Cross-Platform Rust Toolkit for Games 🏹"
description = "Cross-Platform build tools and toolkit for games"
repository = "https://github.com/dodorare/crossbow"
license = "Apache-2.0"
keywords = ["build", "android", "ios", "tools"]
Expand All @@ -14,13 +14,17 @@ exclude = [".github/**/*"]
thiserror = "1.0"
displaydoc = "0.2"
anyhow = "1.0"
serde = { version = "1.0", features = ["derive"] }

android-manifest = { version = "0.1.9", optional = true }
apple-bundle = { version = "0.1.4", optional = true }

[target.'cfg(target_os = "android")'.dependencies]
crossbow-android = { path = "platform/android", version = "0.1.7", optional = true }
ndk-glue = "0.6.2"
ndk-glue = "0.7.0"
crossbow-android = { path = "platform/android", version = "0.1.8", optional = true }

[target.'cfg(target_os = "ios")'.dependencies]
crossbow-ios = { path = "platform/ios", version = "0.1.7", optional = true }
crossbow-ios = { path = "platform/ios", version = "0.1.8", optional = true }

[patch.crates-io]
winit = { git = "https://github.com/rust-windowing/winit", rev = "f93f2c158bf527ed56ab2b6f5272214f0c1d9f7d" }
Expand All @@ -31,6 +35,7 @@ miniquad = { git = "https://github.com/not-fl3/miniquad", rev = "d67ffe6950cf73d
default = ["android", "ios"]
android = ["crossbow-android"]
ios = ["crossbow-ios"]
update-manifest = ["apple-bundle", "android-manifest"]

[workspace]
members = [
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [![Crossbow Splash Image](.github/assets/splash.png)](https://github.com/dodorare/crossbow)
# [![Crossbow Splash Image](assets/splash.png)](https://github.com/dodorare/crossbow)

[![CI Info](https://github.com/dodorare/crossbow/workflows/CI/badge.svg)](https://github.com/dodorare/crossbow/actions)
[![Crate Info](https://img.shields.io/crates/v/crossbow.svg)](https://crates.io/crates/crossbow)
Expand All @@ -16,16 +16,17 @@ The `crossbow` project aims to provide a complete toolkit for cross-platform gam

> There are already [cargo-apk](https://github.com/rust-windowing/android-ndk-rs/tree/master/cargo-apk), [cargo-mobile](https://github.com/BrainiumLLC/cargo-mobile), [cargo-xcode](https://gitlab.com/kornelski/cargo-xcode), etc. - why do I need another packaging tool?

Project `crossbow` is not only a packaging tool for **Android** and iOS - it's a toolkit. With `crossbundle-tools` you can customize and create new commands; with `crossbundle` you can create native **.apk/.aab** without any *Java* or setup *Gradle* project with fancy **Crossbow Android plugins** (**iOS** in near future); with `crossbow-android` you can write your own Android plugins in *Java/Kotlin*.
Project `crossbow` is not only a packaging tool for **Android** and **iOS** - it's cross-platform build tools and toolkit for Rust! With `crossbundle` you can create native **.apk/.aab** without any *Java* or setup *Gradle* project with fancy **Crossbow Android plugins** (**iOS** in near future); with `crossbundle-tools` you can customize and create new commands; with `crossbow-android` you can write your own Android plugins in *Java/Kotlin*.

A lot of functionality was inspired by [Godot](https://github.com/godotengine/godot), [Xamarin](https://dotnet.microsoft.com/en-us/apps/xamarin), and [cargo-apk](https://github.com/rust-windowing/android-ndk-rs/tree/master/cargo-apk).

## Design Goals

* **Customizable**: Create new commands with available tools.
* **Simple**: Easy to start but flexible for strong devs.
* **Simple**: Easy to install and start hacking but also pretty flexible for strong devs.
* **Capable**: It's possible to build plain **.apk/.aab** or **.app/.ipa**; or with help of *Gradle/XCode*.
* **Rust**: Don't leave your *Rust* code - **everything** can be configured from `Cargo.toml`.
* **Plugins**: Godot-like plugins for **Android** (and **iOS** in future) with *Rust* wrapper!

## 📚 Documentation

Expand Down Expand Up @@ -64,7 +65,7 @@ Helper crates:

Also, this project initially funded by [Web3 Foundation Grants Program](https://github.com/w3f/Grants-Program/blob/master/applications/crossbow.md). Big shout-out to them!

<img src=".github/assets/w3f_grants_badge.svg" alt="W3F Grants Badge" width="400px" />
<img src="assets/w3f_grants_badge.svg" alt="W3F Grants Badge" width="400px" />

## 📑 License

Expand Down
Binary file added assets/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
5 changes: 5 additions & 0 deletions assets/res/android/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_adaptive_back"/>
<foreground android:drawable="@mipmap/ic_launcher_adaptive_fore"/>
</adaptive-icon>
Binary file added assets/res/android/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/res/android/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/res/android/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/res/android/mipmap-xxhdpi/ic_launcher.png
Binary file added assets/res/android/mipmap-xxxhdpi/ic_launcher.png
Binary file added assets/res/apple/icon.png
Binary file added assets/splash.png
File renamed without changes
21 changes: 11 additions & 10 deletions crossbundle/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "crossbundle"
version = "0.1.7"
version = "0.1.8"
edition = "2021"
authors = ["DodoRare Team <support@dodorare.com>"]
description = "Build and publish apps for Android/iOS"
Expand All @@ -18,9 +18,10 @@ name = "crossbundle"
path = "src/main.rs"

[dependencies]
crossbundle-tools = { path = "../tools", version = "0.1.7" }
android-tools = "0.2.9"
clap = { version = "3.2.8", features = ["derive"] }
crossbow = { path = "../../", version = "0.1.8", default-features = false, features = ["update-manifest"] }
crossbundle-tools = { path = "../tools", version = "0.1.8", default-features = false }
android-tools = { version = "0.2.10", optional = true }
clap = { version = "3.2", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }

anyhow = "1.0"
Expand All @@ -31,16 +32,16 @@ pretty_env_logger = "0.4"
log = "0.4"

fs_extra = "1.2"
dirs = "4.0.0"
dirs = "4.0"
dunce = "1.0"
ureq = { version = "2.4.0", features = ["tls"] }
ureq = { version = "2.5", features = ["tls"] }
cargo = "0.63.1"
cargo-util = "0.2.0"

[dev-dependencies]
tempfile = "3.2"
tempfile = "3.3"

[features]
default = ["android", "ios"]
android = []
ios = []
default = ["android", "apple"]
android = ["crossbow/android", "crossbundle-tools/android", "android-tools"]
apple = ["crossbow/ios", "crossbundle-tools/apple"]
Loading