Skip to content

Commit db1c3e2

Browse files
Platform binaries reland (#115502)
You can now specify a --local-web-sdk flag to point to a wasm_release folder. This will make it so that only artifacts that pertain to the web sdk are overridden to point to the wasm_release folder. Other artifacts (such as impellerc) will pull from the cache, or from the --local-engine path if that is specified. This also uses precompiled platform kernel files for both ddc and dart2js
1 parent 08a2635 commit db1c3e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+810
-471
lines changed

packages/flutter_tools/lib/executable.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Future<void> main(List<String> args) async {
107107
// devtools source code.
108108
DevtoolsLauncher: () => DevtoolsServerLauncher(
109109
processManager: globals.processManager,
110-
dartExecutable: globals.artifacts!.getHostArtifact(HostArtifact.engineDartBinary).path,
110+
dartExecutable: globals.artifacts!.getArtifactPath(Artifact.engineDartBinary),
111111
logger: globals.logger,
112112
botDetector: globals.botDetector,
113113
),

packages/flutter_tools/lib/src/android/gradle.dart

+12-12
Original file line numberDiff line numberDiff line change
@@ -277,22 +277,22 @@ class AndroidGradleBuilder implements AndroidBuilder {
277277
if (!buildInfo.androidGradleDaemon) {
278278
command.add('--no-daemon');
279279
}
280-
if (_artifacts is LocalEngineArtifacts) {
281-
final LocalEngineArtifacts localEngineArtifacts = _artifacts as LocalEngineArtifacts;
280+
final LocalEngineInfo? localEngineInfo = _artifacts.localEngineInfo;
281+
if (localEngineInfo != null) {
282282
final Directory localEngineRepo = _getLocalEngineRepo(
283-
engineOutPath: localEngineArtifacts.engineOutPath,
283+
engineOutPath: localEngineInfo.engineOutPath,
284284
androidBuildInfo: androidBuildInfo,
285285
fileSystem: _fileSystem,
286286
);
287287
_logger.printTrace(
288-
'Using local engine: ${localEngineArtifacts.engineOutPath}\n'
288+
'Using local engine: ${localEngineInfo.engineOutPath}\n'
289289
'Local Maven repo: ${localEngineRepo.path}'
290290
);
291291
command.add('-Plocal-engine-repo=${localEngineRepo.path}');
292292
command.add('-Plocal-engine-build-mode=${buildInfo.modeName}');
293-
command.add('-Plocal-engine-out=${localEngineArtifacts.engineOutPath}');
293+
command.add('-Plocal-engine-out=${localEngineInfo.engineOutPath}');
294294
command.add('-Ptarget-platform=${_getTargetPlatformByLocalEnginePath(
295-
localEngineArtifacts.engineOutPath)}');
295+
localEngineInfo.engineOutPath)}');
296296
} else if (androidBuildInfo.targetArchs.isNotEmpty) {
297297
final String targetPlatforms = androidBuildInfo
298298
.targetArchs
@@ -611,20 +611,20 @@ class AndroidGradleBuilder implements AndroidBuilder {
611611
);
612612
}
613613

614-
if (_artifacts is LocalEngineArtifacts) {
615-
final LocalEngineArtifacts localEngineArtifacts = _artifacts as LocalEngineArtifacts;
614+
final LocalEngineInfo? localEngineInfo = _artifacts.localEngineInfo;
615+
if (localEngineInfo != null) {
616616
final Directory localEngineRepo = _getLocalEngineRepo(
617-
engineOutPath: localEngineArtifacts.engineOutPath,
617+
engineOutPath: localEngineInfo.engineOutPath,
618618
androidBuildInfo: androidBuildInfo,
619619
fileSystem: _fileSystem,
620620
);
621621
_logger.printTrace(
622-
'Using local engine: ${localEngineArtifacts.engineOutPath}\n'
622+
'Using local engine: ${localEngineInfo.engineOutPath}\n'
623623
'Local Maven repo: ${localEngineRepo.path}'
624624
);
625625
command.add('-Plocal-engine-repo=${localEngineRepo.path}');
626626
command.add('-Plocal-engine-build-mode=${buildInfo.modeName}');
627-
command.add('-Plocal-engine-out=${localEngineArtifacts.engineOutPath}');
627+
command.add('-Plocal-engine-out=${localEngineInfo.engineOutPath}');
628628

629629
// Copy the local engine repo in the output directory.
630630
try {
@@ -639,7 +639,7 @@ class AndroidGradleBuilder implements AndroidBuilder {
639639
);
640640
}
641641
command.add('-Ptarget-platform=${_getTargetPlatformByLocalEnginePath(
642-
localEngineArtifacts.engineOutPath)}');
642+
localEngineInfo.engineOutPath)}');
643643
} else if (androidBuildInfo.targetArchs.isNotEmpty) {
644644
final String targetPlatforms = androidBuildInfo.targetArchs
645645
.map(getPlatformNameForAndroidArch).join(',');

0 commit comments

Comments
 (0)