Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
name: Build Flutter-Pi Bundle (${{ matrix.arch }}, ${{ matrix.cpu}})
Expand Down Expand Up @@ -35,7 +38,7 @@ jobs:
with:
cache: true
channel: stable
flutter-version: 3.38.0
flutter-version: 3.38.4

- name: Install dependencies & Activate as global executable
run: |
Expand All @@ -47,19 +50,21 @@ jobs:

- name: Run flutterpi_tool build
working-directory: test_app
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: |
echo '::group::flutterpi_tool build ... --debug-unoptimized'
flutterpi_tool build --arch=${{ matrix.arch }} --cpu=${{ matrix.cpu }} --debug-unoptimized --debug-symbols
flutterpi_tool build --arch=${{ matrix.arch }} --cpu=${{ matrix.cpu }} --debug-unoptimized --debug-symbols --verbose
echo '::endgroup::'

echo '::group::flutterpi_tool build ... --debug'
flutterpi_tool build --arch=${{ matrix.arch }} --cpu=${{ matrix.cpu }} --debug --debug-symbols
flutterpi_tool build --arch=${{ matrix.arch }} --cpu=${{ matrix.cpu }} --debug --debug-symbols --verbose
echo '::endgroup::'

echo '::group::flutterpi_tool build ... --profile'
flutterpi_tool build --arch=${{ matrix.arch }} --cpu=${{ matrix.cpu }} --profile --debug-symbols
flutterpi_tool build --arch=${{ matrix.arch }} --cpu=${{ matrix.cpu }} --profile --debug-symbols --verbose
echo '::endgroup::'

echo '::group::flutterpi_tool build ... --release'
flutterpi_tool build --arch=${{ matrix.arch }} --cpu=${{ matrix.cpu }} --release --debug-symbols
flutterpi_tool build --arch=${{ matrix.arch }} --cpu=${{ matrix.cpu }} --release --debug-symbols --verbose
echo '::endgroup::'
7 changes: 6 additions & 1 deletion .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,22 @@ on:
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
cache: true
channel: stable
flutter-version: 3.38.0
flutter-version: 3.38.4

- name: Install dependencies
run: flutter pub get
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## unreleased

- flutter 3.38.4 compatibility
- fix hook results not rebuilding on hot reload
- try to source github authentication token from GITHUB_TOKEN environment
variable

## 0.10.0 - 2025-12-10
- support flutter 3.38

Expand Down
9 changes: 9 additions & 0 deletions lib/src/build_system/extended_environment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,13 @@ class ExtendedEnvironment implements Environment {
final FlutterpiArtifacts artifacts;

final MoreOperatingSystemUtils operatingSystemUtils;

@override
ExtendedEnvironment copyWith({Directory? outputDir}) {
return ExtendedEnvironment.wrap(
delegate: _delegate.copyWith(outputDir: outputDir),
operatingSystemUtils: operatingSystemUtils,
artifacts: artifacts,
);
}
}
5 changes: 4 additions & 1 deletion lib/src/cli/flutterpi_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ mixin FlutterpiCommandMixin on fl.FlutterCommand {
httpClient ??= http.Client();

final String? token;
if (argParser.options.containsKey('github-artifacts-auth-token')) {
if (globals.platform.environment['GITHUB_TOKEN'] case final envToken?) {
globals.logger.printTrace('Using GITHUB_TOKEN from environment.');
token = envToken;
} else if (argParser.options.containsKey('github-artifacts-auth-token')) {
token = stringArg('github-artifacts-auth-token');
} else {
token = null;
Expand Down
1 change: 1 addition & 0 deletions lib/src/context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Future<V> runInContext<V>(
processUtils: globals.processUtils,
defaultRemote: '',
),
fl.FlutterHookRunner: () => fl.FlutterHookRunnerNative(),
},
);
}
2 changes: 2 additions & 0 deletions lib/src/fltool/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@ export 'package:flutter_tools/src/build_system/exceptions.dart';
export 'package:flutter_tools/src/build_system/targets/assets.dart';
export 'package:flutter_tools/src/web/devfs_config.dart';
export 'package:flutter_tools/src/build_system/targets/native_assets.dart';
export 'package:flutter_tools/src/hook_runner.dart';
export 'package:flutter_tools/src/build_system/targets/hook_runner_native.dart';