fuzzyworld

haunt / commit

Add favicon.ico and favicon.png to repo root; include in generateIcons task

f46c06625271315c5c0c875ec90c8fa29c83e286 · Pavel Safronov · 2026-05-14 10:52:51 -0700 · parents f34f37144f84

Add favicon.ico and favicon.png to repo root; include in generateIcons task

favicon.ico contains 16/32/48 px layers for legacy clients.
favicon.png is a 32×32 flat PNG for modern <link rel="icon"> use.
Both use the same #ADD8E6 background as the Android launcher icons.
Both are regenerated by gradle :app:generateIcons alongside the mipmaps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
 app/build.gradle.kts |  15 +++++++++++++++
 favicon.ico          | Bin 0 -> 15086 bytes
 favicon.png          | Bin 0 -> 1566 bytes
 3 files changed, 15 insertions(+)

diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 0d5b7f4..ee2fa7e 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -88,6 +88,21 @@ tasks.register("generateIcons") {
             "-resize", "264x264", "-gravity", "center", "-extent", "432x432",
             fg.absolutePath)
         println("  ✓ drawable/ic_launcher_foreground.png (432×432)")
+
+        // Web favicons — written to repo root for GitLab/GitHub project pages
+        val root = rootProject.projectDir
+        magick(src.absolutePath, "-background", bgColor, "-flatten",
+            "(", "-clone", "0", "-resize", "16x16", ")",
+            "(", "-clone", "0", "-resize", "32x32", ")",
+            "(", "-clone", "0", "-resize", "48x48", ")",
+            "-delete", "0",
+            root.resolve("favicon.ico").absolutePath)
+        println("  ✓ favicon.ico (16/32/48 px layers)")
+
+        magick(src.absolutePath, "-background", bgColor, "-flatten",
+            "-resize", "32x32",
+            root.resolve("favicon.png").absolutePath)
+        println("  ✓ favicon.png (32×32)")
     }
 }
 
diff --git a/favicon.ico b/favicon.ico
new file mode 100644
index 0000000..82d9482
Binary files /dev/null and b/favicon.ico differ
diff --git a/favicon.png b/favicon.png
new file mode 100644
index 0000000..0dfc8fb
Binary files /dev/null and b/favicon.png differ