Skip to content
Snippets Groups Projects
Commit a693824e authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Merge branch '21-fix-application-icon' into 'master'

Resolve "Fix application icon"

Closes #21

See merge request !18
parents 76fa1783 d32a7ae5
No related branches found
No related tags found
1 merge request!18Resolve "Fix application icon"
Pipeline #1454 passed
......@@ -2,5 +2,5 @@ org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
app.versionName=1.1.6
app.versionCode=6
app.versionName=1.1.7
app.versionCode=7
......@@ -9,7 +9,7 @@ command -v convert >/dev/null 2>&1 || { echo >&2 "I require convert (imagemagick
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
BASE_DIR="$(dirname "${CURRENT_DIR}")"
SOURCE="${CURRENT_DIR}/hangman.svg"
SOURCE="${CURRENT_DIR}/icon.svg"
OPTIPNG_OPTIONS="-preserve -quiet -o7"
# optimize svg
......@@ -31,6 +31,8 @@ function build_icon() {
TARGET_PNG="${TARGET}.png"
mkdir -p "$(dirname "${TARGET_PNG}")"
inkscape \
--export-width=${ICON_SIZE} \
--export-height=${ICON_SIZE} \
......@@ -40,45 +42,11 @@ function build_icon() {
optipng ${TARGET_PNG} ${TARGET_PNG}
}
build_icon 324 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground
build_icon 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round
build_icon 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher
build_icon 162 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground
build_icon 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher_round
build_icon 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher
build_icon 432 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground
build_icon 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round
build_icon 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher
build_icon 108 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground
build_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher_round
build_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher
build_icon 216 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground
build_icon 216 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round
build_icon 216 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher
build_icon 128 ${BASE_DIR}/assets/images/icon128
build_icon 192 ${BASE_DIR}/fastlane/metadata/android/en-US/images/icon
build_icon 192 ${BASE_DIR}/fastlane/metadata/android/fr-FR/images/icon
# convert to webp
function convert_to_webp() {
FILE="$1"
convert ${FILE}.png ${FILE}.webp
rm ${FILE}.png
}
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher_round
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher_round
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round
convert_to_webp ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment