mirror of
https://github.com/inventree/inventree-app.git
synced 2025-07-12 00:24:12 +00:00
.github
android
assets
ios
lib
res
test
.gitignore
.gitmodules
.metadata
BUILDING.md
LICENSE
README.md
analysis_options.yaml
crowdin.yml
find_dart_files.py
l10n.yaml
pubspec.lock
pubspec.yaml
requirements.txt
tasks.py
* Improve tasks.py - Works from any subdir now * Update stock detail display * FIx width of "serial" column in stock item list
36 lines
764 B
Python
36 lines
764 B
Python
"""Invoke tasks for building the app"""
|
|
|
|
import os
|
|
import sys
|
|
from invoke import task
|
|
|
|
|
|
@task
|
|
def clean(c):
|
|
"""Clean flutter build"""
|
|
c.run("flutter clean")
|
|
|
|
|
|
@task
|
|
def translate(c):
|
|
"""Update translation files"""
|
|
|
|
here = os.path.dirname(__file__)
|
|
l10_dir = os.path.join(here, 'lib', 'l10n')
|
|
l10_dir = os.path.abspath(l10_dir)
|
|
|
|
python = 'python3' if sys.platform.lower() == 'darwin' else 'python'
|
|
c.run(f"cd {l10_dir} && {python} collect_translations.py")
|
|
|
|
|
|
@task(pre=[clean, translate])
|
|
def ios(c):
|
|
"""Build iOS app"""
|
|
c.run("flutter build ipa --release --no-tree-shake-icons")
|
|
|
|
|
|
@task(pre=[clean, translate])
|
|
def android(c):
|
|
"""Build Android app"""
|
|
c.run("flutter build appbundle --release --no-tree-shake-icons")
|