Files
coco 723ce1af5c a
2026-07-03 15:12:48 +08:00

164 lines
5.2 KiB
Groovy

plugins {
id "com.android.application"
id "org.jetbrains.kotlin.android"
id "dev.zacsweers.moshix" version "0.18.3"
id "dagger.hilt.android.plugin"
id "kotlin-kapt"
id "com.google.protobuf" version "0.8.18"
}
android {
compileSdk 33
defaultConfig {
applicationId "bruhcollective.itaysonlab.jetispot"
minSdk 23
targetSdk 33
versionCode version_code
versionName version_name
resConfigs 'en'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets.main {
jniLibs.srcDir "src/main/libs"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
}
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_compiler_version
}
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas")
}
}
packagingOptions {
resources {
excludes += "/META-INF/*.kotlin_module"
excludes += "/META-INF/*.version"
excludes += "/META-INF/**"
excludes += "/kotlin/**"
excludes += "/kotlinx/**"
excludes += "**/*.properties"
excludes += "DebugProbesKt.bin"
excludes += "kotlin-tooling-metadata.json"
excludes += "/META-INF/{AL2.0,LGPL2.1}"
excludes += "log4j2.xml"
excludes += "**.proto"
}
}
namespace 'bruhcollective.itaysonlab.jetispot'
}
moshi {
// Opt-in to enable moshi-sealed, disabled by default.
enableSealed.set(true)
}
dependencies {
// Kotlin
implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.4.0"
// AndroidX
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.2.0"
implementation "androidx.core:core-ktx:1.9.0"
implementation "androidx.palette:palette-ktx:1.0.0"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.1"
// Compose
implementation "androidx.navigation:navigation-compose:2.5.2"
implementation "androidx.activity:activity-compose:1.6.0"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.material3:material3:$compose_m3_version"
implementation "androidx.compose.material:material-icons-extended:$compose_version"
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation "androidx.compose.ui:ui-util:$compose_version"
implementation "androidx.compose.ui:ui-tooling:$compose_version"
debugImplementation "androidx.customview:customview:1.2.0-alpha02"
debugImplementation "androidx.customview:customview-poolingcontainer:1.0.0"
// Compose - Additions
implementation "com.google.accompanist:accompanist-navigation-material:$accompanist_version"
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
implementation "com.google.accompanist:accompanist-pager:$accompanist_version"
// Images
implementation "io.coil-kt:coil-compose:2.2.0"
// DI
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
implementation "com.google.dagger:hilt-android:$hilt_version"
kapt "com.google.dagger:hilt-compiler:$hilt_version"
// Playback
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.6.4"
implementation "com.gitlab.mvysny.slf4j:slf4j-handroid:1.7.30"
implementation "androidx.media2:media2-session:$media2_version"
implementation "androidx.media2:media2-player:$media2_version"
// Librespot
implementation ("com.github.iTaysonLab.librespot-java:librespot-player:$librespot_commit:thin") {
exclude group: "xyz.gianlu.librespot", module: "librespot-sink"
exclude group: "com.lmax", module: "disruptor"
exclude group: "org.apache.logging.log4j"
}
// Data - Network
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-moshi:2.9.0"
implementation "com.squareup.retrofit2:converter-protobuf:2.9.0"
// Data - SQL
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
implementation "androidx.room:room-paging:$room_version"
kapt "androidx.room:room-compiler:$room_version"
// Data - Proto
implementation "androidx.datastore:datastore:1.0.0"
implementation "com.google.protobuf:protobuf-java:3.21.5"
implementation "com.tencent:mmkv:1.2.14"
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.21.5"
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
//option "lite"
}
}
}
}
}