Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

# Rust Android


Docker Pulls
Docker Image Size with architecture (latest by date/latest semver)


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_application

jobs:
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
```