mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-02-04 17:23:19 +00:00
Add Nix configuration files and script for Flutter version management
This commit is contained in:
parent
ae457e8235
commit
cb47982026
6 changed files with 263 additions and 48 deletions
64
.github/workflows/android.yaml
vendored
64
.github/workflows/android.yaml
vendored
|
|
@ -3,57 +3,25 @@
|
|||
name: Android
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker.io/nixos/nix:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
- name: Collect Translation Files
|
||||
run: |
|
||||
cd lib/l10n
|
||||
nix --extra-experimental-features 'nix-command flakes' develop --command python3 collect_translations.py
|
||||
cd ../..
|
||||
|
||||
- name: Setup FVM
|
||||
id: fvm-config-action
|
||||
uses: kuhnroyal/flutter-fvm-config-action@v2
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
|
||||
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
|
||||
cache: false
|
||||
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
|
||||
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
|
||||
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:"
|
||||
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
|
||||
|
||||
- run: flutter --version
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/gradle-build-action@v2.4.2
|
||||
with:
|
||||
gradle-version: 8.7
|
||||
|
||||
- name: Collect Translation Files
|
||||
run: |
|
||||
cd lib/l10n
|
||||
python3 collect_translations.py
|
||||
|
||||
- name: Build for Android
|
||||
run: |
|
||||
dart pub global activate fvm
|
||||
fvm install
|
||||
fvm flutter pub get
|
||||
fvm flutter build apk --debug
|
||||
- name: Build Debug APK
|
||||
run: |
|
||||
nix --extra-experimental-features 'nix-command flakes' develop --command flutter build apk --debug
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue