Update flutter_tools internals related to Gradle/XCode to set --local-engine-host. (#132346)

Partial work towards https://github.com/flutter/flutter/issues/132245.

I made a minor refactor to test-only code because it was too confusing
to have 2 optional parameters that are technically required together,
but otherwise all other changes *should* be pass throughs. That being
said, I can't say I totally understand the Gradle stuff so I could use a
hand double checking that.
This commit is contained in:
Matan Lurey
2023-08-15 07:28:18 -07:00
committed by GitHub
parent 9526142cad
commit 6579844528
9 changed files with 73 additions and 33 deletions

View File

@@ -401,6 +401,7 @@ class AndroidGradleBuilder implements AndroidBuilder {
command.add('-Plocal-engine-repo=${localEngineRepo.path}');
command.add('-Plocal-engine-build-mode=${buildInfo.modeName}');
command.add('-Plocal-engine-out=${localEngineInfo.engineOutPath}');
command.add('-Plocal-engine-host-out=${localEngineInfo.engineHostOutPath}');
command.add('-Ptarget-platform=${_getTargetPlatformByLocalEnginePath(
localEngineInfo.engineOutPath)}');
} else if (androidBuildInfo.targetArchs.isNotEmpty) {
@@ -726,6 +727,7 @@ class AndroidGradleBuilder implements AndroidBuilder {
command.add('-Plocal-engine-repo=${localEngineRepo.path}');
command.add('-Plocal-engine-build-mode=${buildInfo.modeName}');
command.add('-Plocal-engine-out=${localEngineInfo.engineOutPath}');
command.add('-Plocal-engine-host-out=${localEngineInfo.engineHostOutPath}');
// Copy the local engine repo in the output directory.
try {