2023-12-17 22:38:10 -06:00
|
|
|
plugins {
|
2024-01-04 17:36:58 -06:00
|
|
|
id("com.google.devtools.ksp")
|
2025-02-05 20:15:58 +02:00
|
|
|
alias(libs.plugins.android.application)
|
|
|
|
alias(libs.plugins.jetbrains.kotlin.android)
|
|
|
|
alias(libs.plugins.dagger.hilt.android)
|
2023-12-17 22:38:10 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
namespace = "org.musicpd"
|
2025-02-01 12:39:51 +02:00
|
|
|
compileSdk = 35
|
2023-12-17 22:38:10 -06:00
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId = "org.musicpd"
|
|
|
|
minSdk = 24
|
2025-02-01 12:39:51 +02:00
|
|
|
targetSdk = 34
|
2023-12-17 22:38:10 -06:00
|
|
|
versionCode = 1
|
|
|
|
versionName = "1.0"
|
2023-12-22 13:05:39 -06:00
|
|
|
vectorDrawables {
|
|
|
|
useSupportLibrary = true
|
|
|
|
}
|
2023-12-17 22:38:10 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
aidl = true
|
2023-12-22 13:05:39 -06:00
|
|
|
compose = true
|
|
|
|
}
|
|
|
|
|
|
|
|
composeOptions {
|
2025-02-03 23:07:42 +02:00
|
|
|
kotlinCompilerExtensionVersion = "1.5.10"
|
2023-12-17 22:38:10 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
2025-02-01 11:11:34 +02:00
|
|
|
debug {
|
2023-12-17 22:38:10 -06:00
|
|
|
isMinifyEnabled = false
|
2025-02-01 11:11:34 +02:00
|
|
|
}
|
|
|
|
release {
|
|
|
|
isMinifyEnabled = true
|
2023-12-17 22:38:10 -06:00
|
|
|
proguardFiles(
|
|
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
|
|
"proguard-rules.pro"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2025-02-04 10:22:17 +02:00
|
|
|
// flavors
|
|
|
|
flavorDimensions += "base"
|
|
|
|
productFlavors {
|
2025-02-06 14:11:06 +02:00
|
|
|
create("fail-test") {
|
|
|
|
// To test System.loadLibrary("mpd") failure
|
|
|
|
// exclude the native lib from the package
|
|
|
|
packaging {
|
|
|
|
jniLibs {
|
|
|
|
// it appears the 'excludes' is applied to all flavors
|
|
|
|
// even if it's only inside this flavor.
|
|
|
|
// this filters by task name to apply the exclusion only
|
|
|
|
// for this flavor name.
|
|
|
|
// (clearing the 'abiFilters' will only create a universal apk
|
|
|
|
// with all of the abi versions)
|
|
|
|
gradle.startParameter.getTaskNames().forEach { task ->
|
|
|
|
if (task.contains("fail-test", ignoreCase = true)) {
|
|
|
|
println("NOTICE: excluding libmpd.so from package $task for testing")
|
|
|
|
excludes += "**/libmpd.so"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2025-02-04 10:22:17 +02:00
|
|
|
create("arm64-v8a") {
|
|
|
|
ndk {
|
|
|
|
// ABI to include in package
|
|
|
|
//noinspection ChromeOsAbiSupport
|
|
|
|
abiFilters += listOf("arm64-v8a")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
create("x86_64") {
|
|
|
|
ndk {
|
|
|
|
// ABI to include in package
|
|
|
|
abiFilters += listOf("x86_64")
|
|
|
|
}
|
|
|
|
}
|
2025-02-05 20:31:43 +02:00
|
|
|
create("universal") {
|
|
|
|
ndk {
|
|
|
|
// ABI to include in package
|
|
|
|
abiFilters += listOf("arm64-v8a", "x86_64")
|
|
|
|
}
|
|
|
|
}
|
2025-02-04 10:22:17 +02:00
|
|
|
}
|
2023-12-17 22:38:10 -06:00
|
|
|
compileOptions {
|
2023-12-22 12:30:27 -06:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_9
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_9
|
2023-12-17 22:38:10 -06:00
|
|
|
}
|
2023-12-22 13:05:39 -06:00
|
|
|
kotlinOptions {
|
2025-02-04 10:22:17 +02:00
|
|
|
jvmTarget = JavaVersion.VERSION_1_9.toString()
|
2023-12-22 13:05:39 -06:00
|
|
|
}
|
|
|
|
packaging {
|
|
|
|
resources {
|
|
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
|
|
}
|
|
|
|
}
|
2023-12-17 22:38:10 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2025-02-05 20:15:58 +02:00
|
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
|
|
implementation(platform(libs.androidx.compose.bom))
|
2023-12-22 13:05:39 -06:00
|
|
|
|
2025-02-05 20:15:58 +02:00
|
|
|
implementation(libs.androidx.material3)
|
|
|
|
implementation(libs.androidx.activity.compose)
|
|
|
|
implementation(libs.androidx.material.icons.extended)
|
|
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
|
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
|
|
|
implementation(libs.androidx.navigation.compose)
|
2023-12-22 22:52:33 -06:00
|
|
|
|
2025-02-05 20:15:58 +02:00
|
|
|
implementation(libs.compose.settings.ui.m3)
|
|
|
|
implementation(libs.compose.settings.storage.preferences)
|
|
|
|
implementation(libs.accompanist.permissions)
|
2023-12-22 13:05:39 -06:00
|
|
|
|
2025-02-05 20:15:58 +02:00
|
|
|
implementation(libs.hilt.android)
|
|
|
|
ksp(libs.dagger.compiler)
|
|
|
|
ksp(libs.hilt.compiler)
|
2024-01-04 17:36:58 -06:00
|
|
|
|
2025-02-05 20:15:58 +02:00
|
|
|
implementation(libs.androidx.media3.session)
|
2024-01-05 18:17:54 -06:00
|
|
|
|
2023-12-22 13:05:39 -06:00
|
|
|
// Android Studio Preview support
|
2025-02-05 20:15:58 +02:00
|
|
|
implementation(libs.androidx.ui.tooling.preview)
|
|
|
|
debugImplementation(libs.androidx.ui.tooling)
|
|
|
|
debugImplementation(libs.androidx.ui.test.manifest)
|
2023-12-22 13:05:39 -06:00
|
|
|
|
2025-02-05 20:15:58 +02:00
|
|
|
implementation(libs.androidx.appcompat)
|
2023-12-27 13:27:02 -06:00
|
|
|
}
|