Recently Written · git

ink-recents

Ink Recents: a recent-apps switcher drawn for e-ink readers. No animation, swipe up to close, swipe down to close the others.

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

Log | Files | Refs


app/build.gradle.kts (2302 bytes)

1 import java.util.Properties
2 
3 plugins {
4     id("com.android.application")
5     id("org.jetbrains.kotlin.android")
6 }
7 
8 /**
9  * Release signing is optional. The keys come from keystore.properties in the
10  * root of the project, which is not in the repository. Without that file the
11  * release build still runs and makes an unsigned APK, so a fresh clone always
12  * builds.
13  */
14 val keystoreProps = Properties().apply {
15     val f = rootProject.file("keystore.properties")
16     if (f.exists()) f.inputStream().use { load(it) }
17 }
18 val hasSigning = keystoreProps.getProperty("storeFile") != null
19 
20 android {
21     namespace = "dev.equwal.inkrecents"
22     compileSdk = 36
23 
24     defaultConfig {
25         applicationId = "dev.equwal.inkrecents"
26         minSdk = 31
27         targetSdk = 36
28         versionCode = 2
29         versionName = "0.1.1"
30     }
31 
32     signingConfigs {
33         if (hasSigning) {
34             create("release") {
35                 storeFile = rootProject.file(keystoreProps.getProperty("storeFile"))
36                 storePassword = keystoreProps.getProperty("storePassword")
37                 keyAlias = keystoreProps.getProperty("keyAlias")
38                 keyPassword = keystoreProps.getProperty("keyPassword")
39             }
40         }
41     }
42 
43     buildTypes {
44         release {
45             // No shrinking: the app is small, and R8 adds nothing here.
46             isMinifyEnabled = false
47             if (hasSigning) signingConfig = signingConfigs.getByName("release")
48         }
49         debug {
50             applicationIdSuffix = ".debug"
51             versionNameSuffix = "-debug"
52         }
53     }
54 
55     buildFeatures {
56         buildConfig = true
57     }
58 
59     compileOptions {
60         sourceCompatibility = JavaVersion.VERSION_17
61         targetCompatibility = JavaVersion.VERSION_17
62     }
63 
64     kotlinOptions {
65         jvmTarget = "17"
66     }
67 }
68 
69 // Shizuku (Apache-2.0) is the only dependency in the APK. It lets the app run a
70 // command as the shell user, which is how it reads the real task list and
71 // closes a task. The user starts Shizuku from the device. Nothing here needs
72 // root, a computer, or the network.
73 dependencies {
74     implementation("dev.rikka.shizuku:api:13.1.5")
75     implementation("dev.rikka.shizuku:provider:13.1.5")
76 
77     // Tests only, never in the APK.
78     testImplementation("junit:junit:4.13.2")
79 }