commit 35b55af8c1dfd25cdef3e5f697104758b91c4932 truex <truex@equwal.com> 2026-09-26 13:26:44 -0700 Turn on R8 and set the version to 0.1.2 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. RecentsTileService.onClick gets a lint suppression: its SDK check already picks the right call.
CHANGELOG.md | 4 ++++ app/build.gradle.kts | 11 +++++++---- app/proguard-rules.pro | 5 +++++ .../main/java/dev/equwal/inkrecents/RecentsTileService.kt | 3 +++ fastlane/metadata/android/en-US/changelogs/3.txt | 1 + fdroid/README.md | 2 +- fdroid/dev.equwal.inkrecents.yml | 14 +++++++++----- 7 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8afad6c..27a726c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.1.2 + +- The APK is smaller: R8 removes the code that the app does not use. + ## 0.1.1 - Settings has a "Buy me a coffee" row. It opens ko-fi.com/truex. A tip unlocks nothing. diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f5eb2f7..bc64e25 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -25,8 +25,8 @@ android { applicationId = "dev.equwal.inkrecents" minSdk = 31 targetSdk = 36 - versionCode = 2 - versionName = "0.1.1" + versionCode = 3 + versionName = "0.1.2" } 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/app/src/main/java/dev/equwal/inkrecents/RecentsTileService.kt b/app/src/main/java/dev/equwal/inkrecents/RecentsTileService.kt index 7fff395..033421d 100644 --- a/app/src/main/java/dev/equwal/inkrecents/RecentsTileService.kt +++ b/app/src/main/java/dev/equwal/inkrecents/RecentsTileService.kt @@ -2,6 +2,7 @@ // Copyright (c) 2026 equwal package dev.equwal.inkrecents +import android.annotation.SuppressLint import android.app.PendingIntent import android.content.Intent import android.os.Build @@ -16,6 +17,8 @@ import android.service.quicksettings.TileService */ class RecentsTileService : TileService() { + // The SDK check below gives each Android version the call that it supports. + @SuppressLint("StartActivityAndCollapseDeprecated") override fun onClick() { super.onClick() val intent = Intent(this, RecentsActivity::class.java) diff --git a/fastlane/metadata/android/en-US/changelogs/3.txt b/fastlane/metadata/android/en-US/changelogs/3.txt new file mode 100644 index 0000000..6701a6e --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/3.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 4a906d2..bac19ba 100644 --- a/fdroid/README.md +++ b/fdroid/README.md @@ -1,6 +1,6 @@ # How to submit Ink Recents to F-Droid -1. The release tag exists already: `v0.1.1`. For a later version, tag it and push the tag. +1. The release tag exists already: `v0.1.2`. For a later version, tag it and push the tag. 2. Fork `fdroid/fdroiddata` on GitLab, then clone your fork. 3. Copy `dev.equwal.inkrecents.yml` into `metadata/` of your clone. 4. Run `fdroid readmeta` and `fdroid lint dev.equwal.inkrecents` to check it. diff --git a/fdroid/dev.equwal.inkrecents.yml b/fdroid/dev.equwal.inkrecents.yml index f782908..5d5c0a6 100644 --- a/fdroid/dev.equwal.inkrecents.yml +++ b/fdroid/dev.equwal.inkrecents.yml @@ -12,16 +12,20 @@ AutoName: Ink Recents RepoType: git Repo: https://github.com/equwal/ink-recents.git +Binaries: + https://github.com/equwal/ink-recents/releases/download/v%v/ink-recents-%v.apk Builds: - - versionName: 0.1.1 - versionCode: 2 - commit: v0.1.1 + - versionName: 0.1.2 + versionCode: 3 + commit: v0.1.2 subdir: app gradle: - yes +AllowedAPKSigningKeys: bcb3127e1931a9b906e8e2498184ef5380f97cbf3531e5bc8bb0064476ee2919 + AutoUpdateMode: Version UpdateCheckMode: Tags -CurrentVersion: 0.1.1 -CurrentVersionCode: 2 +CurrentVersion: 0.1.2 +CurrentVersionCode: 3