Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Platform binaries reland (#115502)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
eyebrowsoffire committed Dec 2, 2022
1 parent 08a2635 commit db1c3e2
Show file tree
Hide file tree
Showing 45 changed files with 810 additions and 471 deletions.
2 changes: 1 addition & 1 deletion packages/flutter_tools/lib/executable.dart
Expand Up @@ -107,7 +107,7 @@ Future<void> main(List<String> args) async {
// devtools source code.
DevtoolsLauncher: () => DevtoolsServerLauncher(
processManager: globals.processManager,
dartExecutable: globals.artifacts!.getHostArtifact(HostArtifact.engineDartBinary).path,
dartExecutable: globals.artifacts!.getArtifactPath(Artifact.engineDartBinary),
logger: globals.logger,
botDetector: globals.botDetector,
),
Expand Down
24 changes: 12 additions & 12 deletions packages/flutter_tools/lib/src/android/gradle.dart
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -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(',');
Expand Down

0 comments on commit db1c3e2

Please sign in to comment.