Recently Written · git

ink-dim

Ink Dim: tap to set the frontlight of a Viwoods AiPaper reader below the lowest system level. Tap again to go back.

git clone https://github.com/equwal/ink-dim

Log | Files | Refs


commit 6bc96add08611bd7f4dbffee843febc854b36f15
truex <truex@equwal.com>
2026-09-26 13:11:58 -0700

Turn on R8 and set the version to 0.1.1

F-Droid asks for R8 and for a reproducible build. The recipe now names the signed APK on GitHub (Binaries) and the key that signs it (AllowedAPKSigningKeys). proguard-rules.pro keeps Shizuku.newProcess, which Shell.kt finds by name.

 CHANGELOG.md                                     |  4 ++++
 app/build.gradle.kts                             | 11 +++++++----
 app/proguard-rules.pro                           |  5 +++++
 fastlane/metadata/android/en-US/changelogs/2.txt |  1 +
 fdroid/README.md                                 |  2 +-
 fdroid/dev.equwal.inkdim.yml                     | 13 ++++++++-----
 6 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4ab663f..3143614 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Changelog
 
+## 0.1.1
+
+- The APK is smaller: R8 removes the code that the app does not use.
+
 ## 0.1.0
 
 First release.
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 63aa3d1..d37380f 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -25,8 +25,8 @@ android {
         applicationId = "dev.equwal.inkdim"
         minSdk = 31
         targetSdk = 36
-        versionCode = 1
-        versionName = "0.1.0"
+        versionCode = 2
+        versionName = "0.1.1"
     }
 
     signingConfigs {
@@ -42,8 +42,11 @@ android {
 
     buildTypes {
         release {
-            // No shrinking: the app is small, and R8 adds nothing here.
-            isMinifyEnabled = false
+            // R8 removes unused code and resources. F-Droid asks for it.
+            // proguard-rules.pro keeps the one method that Shell.kt finds by name.
+            isMinifyEnabled = true
+            isShrinkResources = true
+            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
             if (hasSigning) signingConfig = signingConfigs.getByName("release")
         }
         debug {
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..7b939d8
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,5 @@
+# Shell.kt calls the private method Shizuku.newProcess by reflection.
+# Keep its name, so that R8 does not remove or rename it.
+-keepclassmembers class rikka.shizuku.Shizuku {
+    *** newProcess(java.lang.String[], java.lang.String[], java.lang.String);
+}
diff --git a/fastlane/metadata/android/en-US/changelogs/2.txt b/fastlane/metadata/android/en-US/changelogs/2.txt
new file mode 100644
index 0000000..6701a6e
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/2.txt
@@ -0,0 +1 @@
+The APK is smaller: R8 removes the code that the app does not use.
diff --git a/fdroid/README.md b/fdroid/README.md
index 950ebed..708d328 100644
--- a/fdroid/README.md
+++ b/fdroid/README.md
@@ -1,6 +1,6 @@
 # How to submit Ink Dim to F-Droid
 
-1. Tag the release `v0.1.0` and push the tag.
+1. Tag the release `v0.1.1` and push the tag.
 2. Fork `fdroid/fdroiddata` on GitLab, then clone your fork.
 3. Copy `dev.equwal.inkdim.yml` into `metadata/` of your clone.
 4. Run `fdroid readmeta` and `fdroid lint dev.equwal.inkdim` to check it.
diff --git a/fdroid/dev.equwal.inkdim.yml b/fdroid/dev.equwal.inkdim.yml
index 5c8f4bb..d60ee45 100644
--- a/fdroid/dev.equwal.inkdim.yml
+++ b/fdroid/dev.equwal.inkdim.yml
@@ -12,16 +12,19 @@ AutoName: Ink Dim
 
 RepoType: git
 Repo: https://github.com/equwal/ink-dim.git
+Binaries: https://github.com/equwal/ink-dim/releases/download/v%v/ink-dim-%v.apk
 
 Builds:
-  - versionName: 0.1.0
-    versionCode: 1
-    commit: v0.1.0
+  - versionName: 0.1.1
+    versionCode: 2
+    commit: v0.1.1
     subdir: app
     gradle:
       - yes
 
+AllowedAPKSigningKeys: bcb3127e1931a9b906e8e2498184ef5380f97cbf3531e5bc8bb0064476ee2919
+
 AutoUpdateMode: Version
 UpdateCheckMode: Tags
-CurrentVersion: 0.1.0
-CurrentVersionCode: 1
+CurrentVersion: 0.1.1
+CurrentVersionCode: 2