fix(ci): generate stub files before flutter analyze
The generated/ directory (app_config.dart, theme_colors.dart) is created by build_whitelabel.py from theme.json. Since theme.json is not in the repo, the lint gate fails on missing generated imports. Added ci_stub_gen.py to produce minimal stubs so flutter analyze passes before the whitelabel build step. Wired into all jobs in ci.yml and release.yml.
This commit is contained in:
@@ -30,6 +30,10 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Generate stubs (lint gate support)
|
||||
if: hashFiles('theme.json') == ''
|
||||
run: python3 ci_stub_gen.py
|
||||
|
||||
- name: Analyze Dart code
|
||||
run: flutter analyze --fatal-warnings
|
||||
|
||||
@@ -55,6 +59,9 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Generate stubs (lint gate support)
|
||||
run: python3 ci_stub_gen.py
|
||||
|
||||
- name: Run tests
|
||||
run: flutter test --reporter=expanded
|
||||
|
||||
@@ -101,6 +108,9 @@ jobs:
|
||||
- name: Install Flutter dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Generate stubs (lint gate support)
|
||||
run: python3 ci_stub_gen.py
|
||||
|
||||
# If release signing secrets are available, write keystore
|
||||
# and update build.gradle.kts to use a release signing config.
|
||||
# Otherwise fall back to debug keys (current state of the repo).
|
||||
|
||||
Reference in New Issue
Block a user