Recently Written · git

subread-overlay

Shows the lines of an .srt over any Android media player, in time with it. Tap a word to look it up.

git clone https://github.com/equwal/subread-overlay

Log | Files | Refs


app/build.gradle.kts (2339 bytes)

1 plugins {
2     alias(libs.plugins.android.application)
3 }
4 
5 // Release signing comes from the environment, so the key never lives in the repository.
6 val keystorePath = providers.environmentVariable("SUBREAD_KEYSTORE_FILE").orNull
7 val keystorePassword = providers.environmentVariable("SUBREAD_KEYSTORE_PASSWORD").orNull
8 val signingReady = !keystorePath.isNullOrBlank() && !keystorePassword.isNullOrBlank() &&
9     file(keystorePath).isFile
10 
11 android {
12     namespace = "space.subread.overlay"
13     compileSdk = 36
14 
15     // No list of dependencies, encrypted for Google alone, inside the app: F-Droid
16     // does not accept a part of the app that nobody else can read.
17     dependenciesInfo {
18         includeInApk = false
19         includeInBundle = false
20     }
21 
22     defaultConfig {
23         applicationId = "space.subread.overlay"
24         minSdk = 26
25         targetSdk = 36
26         // Plain numbers, in this file: F-Droid reads them from here to find a new release.
27         versionCode = 4
28         versionName = "0.3.0"
29         testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
30 
31         // A link to the Ko-fi page. Google Play is not given it (-PplayStore=true), the same
32         // as in the SubRead app.
33         buildConfigField("boolean", "DONATE_LINK", (providers.gradleProperty("playStore").orNull != "true").toString())
34     }
35 
36     if (signingReady) {
37         signingConfigs {
38             create("release") {
39                 storeFile = file(keystorePath!!)
40                 storePassword = keystorePassword
41                 keyAlias = "subread"
42                 keyPassword = keystorePassword
43             }
44         }
45     }
46 
47     buildTypes {
48         debug { applicationIdSuffix = ".debug" }
49         release {
50             isMinifyEnabled = false
51             if (signingReady) signingConfig = signingConfigs.getByName("release")
52         }
53     }
54 
55     compileOptions {
56         sourceCompatibility = JavaVersion.VERSION_17
57         targetCompatibility = JavaVersion.VERSION_17
58     }
59     buildFeatures { buildConfig = true }
60 }
61 
62 dependencies {
63     implementation(project(":core"))
64     implementation(libs.androidx.core.ktx)
65 
66     androidTestImplementation(libs.junit)
67     androidTestImplementation(libs.androidx.test.runner)
68     androidTestImplementation(libs.androidx.test.junit)
69     androidTestImplementation(libs.androidx.test.core)
70 }