SergioRibera / docker-rust-android

A docker container that allows the construction of android applications written with rust with all the tools ready to use

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

# Debug
docker run --rm -it -v "$(pwd)/:/src" -w /src sergioribera/rust-android:170-sdk-33 assembleDebug -p gradle
# Release
docker run --rm -it -v "$(pwd)/:/src" -w /src sergioribera/rust-android:170-sdk-33 assembleRelease -p gradle

Github Action:

Note: for more information, consider looking at my project kill errors

env:
  APP_NAME: my_application

jobs:
  native_build:
    container: sergioribera/rust-android:170-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

About

A docker container that allows the construction of android applications written with rust with all the tools ready to use


Languages

Language:Dockerfile 87.1%Language:Shell 12.9%