[flutter_tools] make bundle-sksl-path a define (#81576)

This commit is contained in:
Jonah Williams 2021-04-30 17:39:07 -07:00 committed by GitHub
parent d4e48a1537
commit 50ace38c32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 8 deletions

View File

@ -70,7 +70,7 @@ BuildApp() {
local bundle_sksl_path=""
if [[ -n "$BUNDLE_SKSL_PATH" ]]; then
bundle_sksl_path="-iBundleSkSLPath=${BUNDLE_SKSL_PATH}"
bundle_sksl_path="-dBundleSkSLPath=${BUNDLE_SKSL_PATH}"
fi
local code_size_directory=""

View File

@ -83,7 +83,7 @@ or
'-dTreeShakeIcons="$treeShakeIcons"',
'-dDartObfuscation=$dartObfuscation',
if (bundleSkSLPath != null)
'-iBundleSkSLPath=$bundleSkSLPath',
'-dBundleSkSLPath=$bundleSkSLPath',
if (codeSizeDirectory != null)
'-dCodeSizeDirectory=$codeSizeDirectory',
if (splitDebugInfo != null)

View File

@ -82,7 +82,7 @@ BuildApp() {
local bundle_sksl_path=""
if [[ -n "$BUNDLE_SKSL_PATH" ]]; then
bundle_sksl_path="-iBundleSkSLPath=${BUNDLE_SKSL_PATH}"
bundle_sksl_path="-dBundleSkSLPath=${BUNDLE_SKSL_PATH}"
fi
# Default value of assets_path is flutter_assets

View File

@ -1075,7 +1075,7 @@ abstract class BaseFlutterTask extends DefaultTask {
args "--DartDefines=${dartDefines}"
}
if (bundleSkSLPath != null) {
args "-iBundleSkSLPath=${bundleSkSLPath}"
args "-dBundleSkSLPath=${bundleSkSLPath}"
}
if (codeSizeDirectory != null) {
args "-dCodeSizeDirectory=${codeSizeDirectory}"

View File

@ -36,7 +36,7 @@ Future<Depfile> copyAssets(Environment environment, Directory outputDirectory, {
BuildMode buildMode,
}) async {
// Check for an SkSL bundle.
final String shaderBundlePath = environment.inputs[kBundleSkSLPath];
final String shaderBundlePath = environment.defines[kBundleSkSLPath] ?? environment.inputs[kBundleSkSLPath];
final DevFSContent skslBundle = processSkSLBundle(
shaderBundlePath,
engineVersion: environment.engineVersion,

View File

@ -209,7 +209,7 @@ Future<void> _runFlutterBuild(Directory buildDirectory, BuildInfo buildInfo, Str
'-dTreeShakeIcons="${buildInfo.treeShakeIcons}"',
'-dDartObfuscation=${buildInfo.dartObfuscation}',
if (buildInfo.bundleSkSLPath != null)
'-iBundleSkSLPath=${buildInfo.bundleSkSLPath}',
'-dBundleSkSLPath=${buildInfo.bundleSkSLPath}',
if (buildInfo.codeSizeDirectory != null)
'-dCodeSizeDirectory=${buildInfo.codeSizeDirectory}',
if (buildInfo.splitDebugInfoPath != null)

View File

@ -103,7 +103,7 @@ void main() {
});
testUsingContext('DebugIosApplicationBundle', () async {
environment.inputs[kBundleSkSLPath] = 'bundle.sksl';
environment.defines[kBundleSkSLPath] = 'bundle.sksl';
environment.defines[kBuildMode] = 'debug';
environment.defines[kCodesignIdentity] = 'ABC123';
// Precompiled dart data

View File

@ -205,7 +205,7 @@ void main() {
mode: BuildMode.debug,
))
.createSync();
environment.inputs[kBundleSkSLPath] = 'bundle.sksl';
environment.defines[kBundleSkSLPath] = 'bundle.sksl';
fileSystem.file(
artifacts.getArtifactPath(
Artifact.vmSnapshotData,