Unverified Commit 50ace38c authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

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

parent d4e48a15
......@@ -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=""
......
......@@ -83,7 +83,7 @@ or
'-dTreeShakeIcons="$treeShakeIcons"',
'-dDartObfuscation=$dartObfuscation',
if (bundleSkSLPath != null)
'-iBundleSkSLPath=$bundleSkSLPath',
'-dBundleSkSLPath=$bundleSkSLPath',
if (codeSizeDirectory != null)
'-dCodeSizeDirectory=$codeSizeDirectory',
if (splitDebugInfo != null)
......
......@@ -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
......
......@@ -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}"
......
......@@ -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,
......
......@@ -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)
......
......@@ -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
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment