Three views, chosen by the chips: the poets you pinned, Ganjoor's own order, and alphabetical. Press and hold a poet anywhere to pin or unpin — tapping still opens them, and a pin marker sits beside the name. Pinned is the default. With nothing pinned it is Ganjoor's order untouched, so a fresh install never opens to an empty screen; the hint about holding a poet shows only while the shelf is empty, because once there is something on it the shelf explains itself. Pins keep the order they were made in rather than being sorted. A shelf someone arranges themselves should stay where they put it, and a new pin appearing in the middle of the row is disorienting. Cards or a list, switched from the app bar and remembered. The same storage as bookmarks: a list of a few urls needs no schema. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
101 lines
3.5 KiB
Plaintext
101 lines
3.5 KiB
Plaintext
import java.util.Properties
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.compose)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
}
|
|
|
|
// Release signing is optional: F-Droid builds from source and signs with its own key, so the
|
|
// build has to succeed with no keystore present. Drop a keystore.properties next to settings.gradle
|
|
// (storeFile, storePassword, keyAlias, keyPassword) to sign locally; it is gitignored.
|
|
val keystoreProperties = Properties().apply {
|
|
val file = rootProject.file("keystore.properties")
|
|
if (file.exists()) file.inputStream().use { load(it) }
|
|
}
|
|
|
|
// A delivered file should say what it is without being opened.
|
|
base {
|
|
archivesName = "ganjoor-0.3.0"
|
|
}
|
|
|
|
android {
|
|
namespace = "com.ganjoor.android"
|
|
compileSdk {
|
|
version = release(37)
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId = "com.ganjoor.android"
|
|
minSdk = 24
|
|
targetSdk = 37
|
|
// Pre-1.0 while the app is still being shaped. versionCode only ever climbs: F-Droid
|
|
// refuses an update that does not, and one changelog file per code lives in
|
|
// fastlane/metadata/android/*/changelogs/.
|
|
versionCode = 5
|
|
versionName = "0.3.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
signingConfigs {
|
|
if (keystoreProperties.isNotEmpty()) {
|
|
create("release") {
|
|
storeFile = rootProject.file(keystoreProperties.getProperty("storeFile"))
|
|
storePassword = keystoreProperties.getProperty("storePassword")
|
|
keyAlias = keystoreProperties.getProperty("keyAlias")
|
|
keyPassword = keystoreProperties.getProperty("keyPassword")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
signingConfig = signingConfigs.findByName("release")
|
|
optimization {
|
|
enable = true
|
|
packageScope = setOf("androidx.**", "kotlin.**", "kotlinx.**")
|
|
}
|
|
}
|
|
}
|
|
|
|
// The dependency metadata block is signed with a Google key and is not reproducible, so
|
|
// F-Droid rejects APKs that carry it.
|
|
dependenciesInfo {
|
|
includeInApk = false
|
|
includeInBundle = false
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.compose.material3)
|
|
implementation(libs.androidx.compose.material.icons.core)
|
|
implementation(libs.androidx.compose.ui)
|
|
implementation(libs.androidx.compose.ui.graphics)
|
|
implementation(libs.androidx.compose.ui.tooling.preview)
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.navigation.compose)
|
|
implementation(libs.okhttp)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.coil.compose)
|
|
implementation(libs.coil.network.okhttp)
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
androidTestImplementation(libs.androidx.junit)
|
|
debugImplementation(libs.androidx.compose.ui.test.manifest)
|
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
|
}
|