Recently Written · git

subread-dictionary

Pop-up dictionary for Android that reads Yomitan dictionaries, with local audio

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

Log | Files | Refs


app/build.gradle.kts (2332 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.dictionary"
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.dictionary"
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 = 1
28         versionName = "0.1.0"
29         testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
30 
31         // A link to the Ko-fi page. Google Play is not given it (-PplayStore=true).
32         buildConfigField("boolean", "DONATE_LINK", (providers.gradleProperty("playStore").orNull != "true").toString())
33     }
34 
35     if (signingReady) {
36         signingConfigs {
37             create("release") {
38                 storeFile = file(keystorePath!!)
39                 storePassword = keystorePassword
40                 keyAlias = "subread"
41                 keyPassword = keystorePassword
42             }
43         }
44     }
45 
46     buildTypes {
47         debug { applicationIdSuffix = ".debug" }
48         release {
49             isMinifyEnabled = false
50             if (signingReady) signingConfig = signingConfigs.getByName("release")
51         }
52     }
53 
54     compileOptions {
55         sourceCompatibility = JavaVersion.VERSION_17
56         targetCompatibility = JavaVersion.VERSION_17
57     }
58     buildFeatures { buildConfig = true }
59 }
60 
61 dependencies {
62     implementation(project(":core"))
63     implementation(libs.androidx.core.ktx)
64     implementation(libs.gson)
65 
66     androidTestImplementation(libs.junit)
67     androidTestImplementation(libs.androidx.test.runner)
68     androidTestImplementation(libs.androidx.test.junit)
69     androidTestImplementation(libs.androidx.test.core)
70 }