Skip to content

Commit 0b2ff35

Browse files
OMaudzaSERDUNclaude
authored
fix: fix splash config generation and add android_12 image support (#865)
- Escape # in Makefile color variables to prevent shell comment issues - Remove redundant shell parameter expansion, use Make-only expansion - Add ANDROID_12_SPLASH_IMAGE variable for separate Android 12 splash - Use single quotes in echo to avoid shell interpretation problems Co-authored-by: Dmytro Serdun <d.serdun@webtrit.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5e85c88 commit 0b2ff35

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

makefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,17 @@ FLUTTER_NATIVE_SPLASH_CONFIG = $(CONFIGS_PATH)/flutter_native_splash.yaml
7373
# - Use `SPLASH_COLOR` for a solid background color.
7474
# - Use `SPLASH_IMAGE` for a custom background image (useful for gradients).
7575
# - Only one of them should be set at a time.
76-
SPLASH_COLOR ?= "#123752"
76+
SPLASH_COLOR ?= \#123752
7777

7878
# Android 12+ splash screen configuration
7979
#
8080
# - From Android 12 onwards, splash screens are handled differently.
8181
# - Visit: https://developer.android.com/guide/topics/ui/splash-screen
82-
ANDROID_12_SPLASH_COLOR ?= "#123752"
82+
ANDROID_12_SPLASH_COLOR ?= \#123752
83+
ANDROID_12_SPLASH_IMAGE ?= tool/assets/native_splash/image.png
8384

8485
# Path to splash screen background image (if used)
85-
SPLASH_IMAGE ?= "tool/assets/native_splash/image.png"
86+
SPLASH_IMAGE ?= tool/assets/native_splash/image.png
8687

8788
# ===========================
8889
# Localizely Configuration
@@ -158,11 +159,12 @@ generate-launcher-icons:
158159

159160
## Generate flutter_native_splash.yaml with custom parameters
160161
generate-native-splash-config:
161-
@echo "flutter_native_splash:" > $(FLUTTER_NATIVE_SPLASH_CONFIG)
162-
@echo " color: \"$${SPLASH_COLOR:-$(SPLASH_COLOR)}\"" >> $(FLUTTER_NATIVE_SPLASH_CONFIG)
163-
@echo " image: \"$${SPLASH_IMAGE:-$(SPLASH_IMAGE)}\"" >> $(FLUTTER_NATIVE_SPLASH_CONFIG)
164-
@echo " android_12:" >> $(FLUTTER_NATIVE_SPLASH_CONFIG)
165-
@echo " color: \"$${ANDROID_12_SPLASH_COLOR:-$(ANDROID_12_SPLASH_COLOR)}\"" >> $(FLUTTER_NATIVE_SPLASH_CONFIG)
162+
@echo 'flutter_native_splash:' > $(FLUTTER_NATIVE_SPLASH_CONFIG)
163+
@echo ' color: "$(SPLASH_COLOR)"' >> $(FLUTTER_NATIVE_SPLASH_CONFIG)
164+
@echo ' image: "$(SPLASH_IMAGE)"' >> $(FLUTTER_NATIVE_SPLASH_CONFIG)
165+
@echo ' android_12:' >> $(FLUTTER_NATIVE_SPLASH_CONFIG)
166+
@echo ' color: "$(ANDROID_12_SPLASH_COLOR)"' >> $(FLUTTER_NATIVE_SPLASH_CONFIG)
167+
@echo ' image: "$(ANDROID_12_SPLASH_IMAGE)"' >> $(FLUTTER_NATIVE_SPLASH_CONFIG)
166168

167169
## Generate native splash screen using external config
168170
generate-native-splash:

0 commit comments

Comments
 (0)