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() { ...@@ -70,7 +70,7 @@ BuildApp() {
local bundle_sksl_path="" local bundle_sksl_path=""
if [[ -n "$BUNDLE_SKSL_PATH" ]]; then if [[ -n "$BUNDLE_SKSL_PATH" ]]; then
bundle_sksl_path="-iBundleSkSLPath=${BUNDLE_SKSL_PATH}" bundle_sksl_path="-dBundleSkSLPath=${BUNDLE_SKSL_PATH}"
fi fi
local code_size_directory="" local code_size_directory=""
......
...@@ -83,7 +83,7 @@ or ...@@ -83,7 +83,7 @@ or
'-dTreeShakeIcons="$treeShakeIcons"', '-dTreeShakeIcons="$treeShakeIcons"',
'-dDartObfuscation=$dartObfuscation', '-dDartObfuscation=$dartObfuscation',
if (bundleSkSLPath != null) if (bundleSkSLPath != null)
'-iBundleSkSLPath=$bundleSkSLPath', '-dBundleSkSLPath=$bundleSkSLPath',
if (codeSizeDirectory != null) if (codeSizeDirectory != null)
'-dCodeSizeDirectory=$codeSizeDirectory', '-dCodeSizeDirectory=$codeSizeDirectory',
if (splitDebugInfo != null) if (splitDebugInfo != null)
......
...@@ -82,7 +82,7 @@ BuildApp() { ...@@ -82,7 +82,7 @@ BuildApp() {
local bundle_sksl_path="" local bundle_sksl_path=""
if [[ -n "$BUNDLE_SKSL_PATH" ]]; then if [[ -n "$BUNDLE_SKSL_PATH" ]]; then
bundle_sksl_path="-iBundleSkSLPath=${BUNDLE_SKSL_PATH}" bundle_sksl_path="-dBundleSkSLPath=${BUNDLE_SKSL_PATH}"
fi fi
# Default value of assets_path is flutter_assets # Default value of assets_path is flutter_assets
......
...@@ -1075,7 +1075,7 @@ abstract class BaseFlutterTask extends DefaultTask { ...@@ -1075,7 +1075,7 @@ abstract class BaseFlutterTask extends DefaultTask {
args "--DartDefines=${dartDefines}" args "--DartDefines=${dartDefines}"
} }
if (bundleSkSLPath != null) { if (bundleSkSLPath != null) {
args "-iBundleSkSLPath=${bundleSkSLPath}" args "-dBundleSkSLPath=${bundleSkSLPath}"
} }
if (codeSizeDirectory != null) { if (codeSizeDirectory != null) {
args "-dCodeSizeDirectory=${codeSizeDirectory}" args "-dCodeSizeDirectory=${codeSizeDirectory}"
......
...@@ -36,7 +36,7 @@ Future<Depfile> copyAssets(Environment environment, Directory outputDirectory, { ...@@ -36,7 +36,7 @@ Future<Depfile> copyAssets(Environment environment, Directory outputDirectory, {
BuildMode buildMode, BuildMode buildMode,
}) async { }) async {
// Check for an SkSL bundle. // Check for an SkSL bundle.
final String shaderBundlePath = environment.inputs[kBundleSkSLPath]; final String shaderBundlePath = environment.defines[kBundleSkSLPath] ?? environment.inputs[kBundleSkSLPath];
final DevFSContent skslBundle = processSkSLBundle( final DevFSContent skslBundle = processSkSLBundle(
shaderBundlePath, shaderBundlePath,
engineVersion: environment.engineVersion, engineVersion: environment.engineVersion,
......
...@@ -209,7 +209,7 @@ Future<void> _runFlutterBuild(Directory buildDirectory, BuildInfo buildInfo, Str ...@@ -209,7 +209,7 @@ Future<void> _runFlutterBuild(Directory buildDirectory, BuildInfo buildInfo, Str
'-dTreeShakeIcons="${buildInfo.treeShakeIcons}"', '-dTreeShakeIcons="${buildInfo.treeShakeIcons}"',
'-dDartObfuscation=${buildInfo.dartObfuscation}', '-dDartObfuscation=${buildInfo.dartObfuscation}',
if (buildInfo.bundleSkSLPath != null) if (buildInfo.bundleSkSLPath != null)
'-iBundleSkSLPath=${buildInfo.bundleSkSLPath}', '-dBundleSkSLPath=${buildInfo.bundleSkSLPath}',
if (buildInfo.codeSizeDirectory != null) if (buildInfo.codeSizeDirectory != null)
'-dCodeSizeDirectory=${buildInfo.codeSizeDirectory}', '-dCodeSizeDirectory=${buildInfo.codeSizeDirectory}',
if (buildInfo.splitDebugInfoPath != null) if (buildInfo.splitDebugInfoPath != null)
......
...@@ -103,7 +103,7 @@ void main() { ...@@ -103,7 +103,7 @@ void main() {
}); });
testUsingContext('DebugIosApplicationBundle', () async { testUsingContext('DebugIosApplicationBundle', () async {
environment.inputs[kBundleSkSLPath] = 'bundle.sksl'; environment.defines[kBundleSkSLPath] = 'bundle.sksl';
environment.defines[kBuildMode] = 'debug'; environment.defines[kBuildMode] = 'debug';
environment.defines[kCodesignIdentity] = 'ABC123'; environment.defines[kCodesignIdentity] = 'ABC123';
// Precompiled dart data // Precompiled dart data
......
...@@ -205,7 +205,7 @@ void main() { ...@@ -205,7 +205,7 @@ void main() {
mode: BuildMode.debug, mode: BuildMode.debug,
)) ))
.createSync(); .createSync();
environment.inputs[kBundleSkSLPath] = 'bundle.sksl'; environment.defines[kBundleSkSLPath] = 'bundle.sksl';
fileSystem.file( fileSystem.file(
artifacts.getArtifactPath( artifacts.getArtifactPath(
Artifact.vmSnapshotData, 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