Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flutter_tools] Make bundle sksl a define #81576

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/flutter_tools/bin/macos_assemble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_tools/bin/tool_backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ or
'-dTreeShakeIcons="$treeShakeIcons"',
'-dDartObfuscation=$dartObfuscation',
if (bundleSkSLPath != null)
'-iBundleSkSLPath=$bundleSkSLPath',
'-dBundleSkSLPath=$bundleSkSLPath',
if (codeSizeDirectory != null)
'-dCodeSizeDirectory=$codeSizeDirectory',
if (splitDebugInfo != null)
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_tools/bin/xcode_backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_tools/gradle/flutter.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_tools/lib/src/windows/build_windows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down