89 lines
2.8 KiB
Kotlin
89 lines
2.8 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 = 6
|
|
versionName = "1.3.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\"")
|
|
// Discord-Anwendung von Playtube (gleiche wie in der Desktop-Version; die ID ist oeffentlich).
|
|
buildConfigField("long", "DISCORD_APPLICATION_ID", "1548023494976086127L")
|
|
|
|
// Discord liefert nur diese ABIs mit; x86 wird nur von Emulatoren gebraucht.
|
|
ndk { abiFilters += listOf("arm64-v8a", "armeabi-v7a") }
|
|
}
|
|
|
|
ndkVersion = "29.0.14206865"
|
|
externalNativeBuild {
|
|
cmake {
|
|
path = file("src/main/cpp/CMakeLists.txt")
|
|
version = "3.31.6"
|
|
}
|
|
}
|
|
|
|
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
|
|
prefab = 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")
|
|
implementation("androidx.palette:palette:1.0.0")
|
|
// Discord Social SDK (Rich Presence): nicht im Repo, siehe README "Discord-SDK".
|
|
implementation(files("../libs/discord_partner_sdk.aar"))
|
|
|
|
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")
|
|
}
|