forked from firka/flutter
[web] Add --local-web-sdk flag and use precompiled platform kernels for dart2js and ddc (#114639)
* Dart2JS build step looks for compiled platform binaries. * Use new locations of platform binaries. * Added --local-web-sdk command line flag. * Need to use the matching frontend server when doing ddc stuff. * Update packages/flutter_tools/lib/src/test/web_test_compiler.dart Co-authored-by: Mouad Debbar <mouad.debbar@gmail.com> * Update packages/flutter_tools/lib/src/runner/flutter_command_runner.dart Co-authored-by: Mouad Debbar <mouad.debbar@gmail.com> * Formatting issues. * Need to use URI format for platform dill. * Fix resident runner tests. * Fix analysis issue. * Fix and add unit tests. * Add some useful comments. * Refine doc comments for flags. Co-authored-by: Mouad Debbar <mouad.debbar@gmail.com>
This commit is contained in:
@@ -277,22 +277,22 @@ class AndroidGradleBuilder implements AndroidBuilder {
|
||||
if (!buildInfo.androidGradleDaemon) {
|
||||
command.add('--no-daemon');
|
||||
}
|
||||
if (_artifacts is LocalEngineArtifacts) {
|
||||
final LocalEngineArtifacts localEngineArtifacts = _artifacts as LocalEngineArtifacts;
|
||||
final LocalEngineInfo? localEngineInfo = _artifacts.localEngineInfo;
|
||||
if (localEngineInfo != null) {
|
||||
final Directory localEngineRepo = _getLocalEngineRepo(
|
||||
engineOutPath: localEngineArtifacts.engineOutPath,
|
||||
engineOutPath: localEngineInfo.engineOutPath,
|
||||
androidBuildInfo: androidBuildInfo,
|
||||
fileSystem: _fileSystem,
|
||||
);
|
||||
_logger.printTrace(
|
||||
'Using local engine: ${localEngineArtifacts.engineOutPath}\n'
|
||||
'Using local engine: ${localEngineInfo.engineOutPath}\n'
|
||||
'Local Maven repo: ${localEngineRepo.path}'
|
||||
);
|
||||
command.add('-Plocal-engine-repo=${localEngineRepo.path}');
|
||||
command.add('-Plocal-engine-build-mode=${buildInfo.modeName}');
|
||||
command.add('-Plocal-engine-out=${localEngineArtifacts.engineOutPath}');
|
||||
command.add('-Plocal-engine-out=${localEngineInfo.engineOutPath}');
|
||||
command.add('-Ptarget-platform=${_getTargetPlatformByLocalEnginePath(
|
||||
localEngineArtifacts.engineOutPath)}');
|
||||
localEngineInfo.engineOutPath)}');
|
||||
} else if (androidBuildInfo.targetArchs.isNotEmpty) {
|
||||
final String targetPlatforms = androidBuildInfo
|
||||
.targetArchs
|
||||
@@ -611,20 +611,20 @@ class AndroidGradleBuilder implements AndroidBuilder {
|
||||
);
|
||||
}
|
||||
|
||||
if (_artifacts is LocalEngineArtifacts) {
|
||||
final LocalEngineArtifacts localEngineArtifacts = _artifacts as LocalEngineArtifacts;
|
||||
final LocalEngineInfo? localEngineInfo = _artifacts.localEngineInfo;
|
||||
if (localEngineInfo != null) {
|
||||
final Directory localEngineRepo = _getLocalEngineRepo(
|
||||
engineOutPath: localEngineArtifacts.engineOutPath,
|
||||
engineOutPath: localEngineInfo.engineOutPath,
|
||||
androidBuildInfo: androidBuildInfo,
|
||||
fileSystem: _fileSystem,
|
||||
);
|
||||
_logger.printTrace(
|
||||
'Using local engine: ${localEngineArtifacts.engineOutPath}\n'
|
||||
'Using local engine: ${localEngineInfo.engineOutPath}\n'
|
||||
'Local Maven repo: ${localEngineRepo.path}'
|
||||
);
|
||||
command.add('-Plocal-engine-repo=${localEngineRepo.path}');
|
||||
command.add('-Plocal-engine-build-mode=${buildInfo.modeName}');
|
||||
command.add('-Plocal-engine-out=${localEngineArtifacts.engineOutPath}');
|
||||
command.add('-Plocal-engine-out=${localEngineInfo.engineOutPath}');
|
||||
|
||||
// Copy the local engine repo in the output directory.
|
||||
try {
|
||||
@@ -639,7 +639,7 @@ class AndroidGradleBuilder implements AndroidBuilder {
|
||||
);
|
||||
}
|
||||
command.add('-Ptarget-platform=${_getTargetPlatformByLocalEnginePath(
|
||||
localEngineArtifacts.engineOutPath)}');
|
||||
localEngineInfo.engineOutPath)}');
|
||||
} else if (androidBuildInfo.targetArchs.isNotEmpty) {
|
||||
final String targetPlatforms = androidBuildInfo.targetArchs
|
||||
.map(getPlatformNameForAndroidArch).join(',');
|
||||
|
||||
Reference in New Issue
Block a user