Remove cargo-apk

This commit is contained in:
Maximilian Ammann 2022-04-23 19:09:29 +02:00
parent d478775113
commit e7e14d014d
3 changed files with 11 additions and 20 deletions

View File

@ -7,11 +7,11 @@ runs:
- uses: extractions/setup-just@v1
- name: Install nightly toolchain
shell: bash
run: just nightly-toolchain
run: just nightly-toolchain-android
- uses: Swatinem/rust-cache@v1
- name: Build
shell: bash
run: cd android/gradle && ./gradlew assembleDebug
run: just build-android
- uses: actions/upload-artifact@v2
with:
name: maplibre-rs.apk

View File

@ -10,23 +10,17 @@ cargo run --example desktop --
## Android
First you have to install cargo-apk:
```bash
cargo install cargo-apk
```
Next, you should make sure that a recent Android NDK is installed. You will need to set the `ANDROID_NDK_ROOT` variable
You should make sure that a recent Android NDK is installed. You will need to set the `ANDROID_NDK_ROOT` variable
to something like this:
```bash
export ANDROID_NDK_ROOT=$HOME/android-sdk/ndk/23.1.7779620/
```
After that you can run the app on a connected device using:
After that you can run the build the library:
``bash
cargo apk run --lib
just build-android
``
## iOS
@ -41,8 +35,6 @@ In order to run this app on macOS you have to open the Xcode project at `./apple
You can then run the app on a macOS. During the Xcode build process cargo is used to build
a static library for the required architecture.
*Hint: Right now only arm64/aarch64 devices are supported*
## Web (WebGL, WebGPU)
If you have a browser which already supports a recent version of the WebGPU specification then you can start a

View File

@ -33,6 +33,10 @@ nightly-toolchain:
rustup component add rust-src --toolchain $NIGHTLY_TOOLCHAIN
rustup override set $NIGHTLY_TOOLCHAIN
nightly-toolchain-android: nightly-toolchain
rustup target add --toolchain $NIGHTLY_TOOLCHAIN x86_64-linux-android
rustup target add --toolchain $NIGHTLY_TOOLCHAIN aarch64-linux-android
webpack-webgl-production: nightly-toolchain
cd web/web && npm install && npm run webgl-production-build
@ -68,14 +72,9 @@ webpack-production: nightly-toolchain
#profile-bench:
# cargo flamegraph --bench render -- --bench
install-cargo-apk:
cargo install cargo-apk
run-apk: print-android-env nightly-toolchain install-cargo-apk
cargo apk run -p maplibre-android --lib -Zbuild-std
build-apk: print-android-env nightly-toolchain install-cargo-apk
cargo apk build -p maplibre-android --lib -Zbuild-std
build-android: print-android-env
cd android/gradle && ./gradlew assembleDebug
# language=bash
print-android-env: