Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sergioribera/docker-rust-android
A docker container that allows the construction of android applications written with rust with all the tools ready to use
https://github.com/sergioribera/docker-rust-android
actions android build build-tool mobile rust rust-lang rustlang
Last synced: about 1 month ago
JSON representation
A docker container that allows the construction of android applications written with rust with all the tools ready to use
- Host: GitHub
- URL: https://github.com/sergioribera/docker-rust-android
- Owner: SergioRibera
- Created: 2023-06-20T04:08:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-09T03:00:18.000Z (2 months ago)
- Last Synced: 2024-10-13T02:41:41.816Z (about 1 month ago)
- Topics: actions, android, build, build-tool, mobile, rust, rust-lang, rustlang
- Language: Dockerfile
- Homepage:
- Size: 191 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Rust Android
This is a project that tries to package in a small container everything needed and required to build an android gradle project.Among the components it has are:
- rust
- gradle
- java jdk
- ndk
- bundletool
- buildtools
- command line tools
- platform tools## Usage
Command Line:
> **Note:** for more information, consider looking at [examples](./examples)```bash
# Debug
docker run --rm -it -v "$(pwd)/:/src" -w /src sergioribera/rust-android:180-sdk-33 assembleDebug -p gradle
# Release
docker run --rm -it -v "$(pwd)/:/src" -w /src sergioribera/rust-android:180-sdk-33 assembleRelease -p gradle
```Github Action:
> **Note:** for more information, consider looking at my project [kill errors](https://github.com/SergioRibera/game_kill_errors)
```yaml
env:
APP_NAME: my_applicationjobs:
native_build:
container: sergioribera/rust-android:180-sdk-33
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Load .env file
uses: xom9ikk/dotenv@v2
# Start to build
- name: build apk
run: gradle assembleRelease -p launchers/mobile/android
- name: Rename APK
run: |
cp launchers/mobile/android/build/outputs/apk/release/android-release.apk ${{ env.APP_NAME }}.apk
- name: build aab
run: |
apk2aab ${{ env.APP_NAME }}.apk ${{ env.APP_NAME }}.aab
```