72 lines
2.1 KiB
Kotlin
72 lines
2.1 KiB
Kotlin
import java.util.Properties
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
}
|
|
|
|
// Signierdaten liegen lokal in keystore.properties (nicht im Repo, siehe README).
|
|
val keystoreProperties = Properties().apply {
|
|
val file = rootProject.file("keystore.properties")
|
|
if (file.exists()) file.inputStream().use { load(it) }
|
|
}
|
|
|
|
android {
|
|
namespace = "de.fojadrachi.playtube"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "de.fojadrachi.playtube"
|
|
minSdk = 26
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "1.0.0"
|
|
|
|
// Update-Quelle: eigener Gitea-Server (kein GitHub/Google Play).
|
|
buildConfigField("String", "UPDATE_SERVER", "\"https://git.fojadrachi.de\"")
|
|
buildConfigField("String", "REPO_SLUG", "\"Fojadrachi/Playtube-Android\"")
|
|
}
|
|
|
|
signingConfigs {
|
|
if (keystoreProperties.containsKey("storeFile")) {
|
|
create("release") {
|
|
storeFile = rootProject.file(keystoreProperties.getProperty("storeFile"))
|
|
storePassword = keystoreProperties.getProperty("storePassword")
|
|
keyAlias = keystoreProperties.getProperty("keyAlias")
|
|
keyPassword = keystoreProperties.getProperty("keyPassword")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
signingConfigs.findByName("release")?.let { signingConfig = it }
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
buildConfig = true
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("androidx.core:core-ktx:1.15.0")
|
|
implementation("androidx.appcompat:appcompat:1.7.0")
|
|
implementation("androidx.webkit:webkit:1.12.1")
|
|
implementation("androidx.media:media:1.7.0")
|
|
|
|
testImplementation("junit:junit:4.13.2")
|
|
// Auf der JVM sind die org.json-Klassen von Android nur Attrappen - echte Bibliothek fuer Tests.
|
|
testImplementation("org.json:json:20240303")
|
|
}
|