Files
cutdex/test/support/dart_executable.dart
T
lingjhf 4a759d81a6
Gitea CI / Check code and tests (push) Successful in 7m38s
Gitea CI / Build Android APK (push) Successful in 6m20s
Gitea CI / Audit and package Windows x64 (push) Canceled after 0s
Gitea CI / Assemble and validate CI artifacts (push) Canceled after 0s
Gitea CI / Gitea CI passed (push) Canceled after 0s
Gitea CI / Build Windows x64 app (push) Canceled after 14m42s
refactor(build): 统一本地与 CI 构建入口及平台发布工具 (#9)
2026-10-06 16:14:42 +00:00

28 lines
671 B
Dart

import 'dart:io';
import 'package:path/path.dart' as p;
/// Uses the SDK running Flutter tests without invoking its shell launcher.
String flutterTestDartExecutable() {
final root = Platform.environment['FLUTTER_ROOT'];
if (root == null || root.isEmpty) {
throw StateError(
'Flutter tests require FLUTTER_ROOT to select their Dart SDK.',
);
}
final executable = p.join(
root,
'bin',
'cache',
'dart-sdk',
'bin',
Platform.isWindows ? 'dart.exe' : 'dart',
);
if (!File(executable).existsSync()) {
throw StateError(
'The Flutter test SDK is missing its native Dart executable.',
);
}
return executable;
}