
Update deps: Kotlin -> 1.7.10 Navigation -> 2.5.0 Lifecycle -> 2.5.0 Activity -> 1.5.0 Fragment -> 1.5.0
115 lines
3.2 KiB
Groovy
115 lines
3.2 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
id "kotlin-android"
|
|
id "androidx.navigation.safeargs.kotlin"
|
|
id "com.diffplug.spotless"
|
|
}
|
|
|
|
android {
|
|
defaultConfig {
|
|
applicationId "org.oxycblt.auxio"
|
|
versionName "2.4.0"
|
|
versionCode 17
|
|
|
|
minSdkVersion 21
|
|
targetSdkVersion 32
|
|
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
}
|
|
|
|
compileSdkVersion 32
|
|
buildToolsVersion "32.0.0"
|
|
|
|
// ExoPlayer, AndroidX, and Material Components all need Java 8 to compile.
|
|
|
|
compileOptions {
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
freeCompilerArgs += "-Xjvm-default=all"
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
applicationIdSuffix = ".debug"
|
|
versionNameSuffix = "-DEBUG"
|
|
}
|
|
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
|
}
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
preDebugBuild.dependsOn spotlessApply
|
|
}
|
|
|
|
dependencies {
|
|
// Kotlin
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3"
|
|
|
|
// --- SUPPORT ---
|
|
|
|
// General
|
|
implementation "androidx.core:core-ktx:1.8.0"
|
|
implementation "androidx.activity:activity-ktx:1.5.0"
|
|
implementation "androidx.fragment:fragment-ktx:1.5.0"
|
|
|
|
// UI
|
|
implementation "androidx.recyclerview:recyclerview:1.2.1"
|
|
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
|
implementation "androidx.viewpager2:viewpager2:1.1.0-beta01"
|
|
|
|
// Lifecycle
|
|
def lifecycle_version = "2.5.0"
|
|
implementation "androidx.lifecycle:lifecycle-common:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
|
|
|
|
// Navigation
|
|
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
|
|
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
|
|
|
|
// Media
|
|
// TODO: Dumpster this for Media3
|
|
implementation "androidx.media:media:1.6.0"
|
|
|
|
// Preferences
|
|
implementation "androidx.preference:preference-ktx:1.2.0"
|
|
|
|
// --- THIRD PARTY ---
|
|
|
|
// Exoplayer
|
|
// WARNING: THE EXOPLAYER VERSION MUST BE KEPT IN LOCK-STEP WITH THE PRE-BUILD SCRIPT.
|
|
// IF NOT, VERY UNFRIENDLY BUILD FAILURES AND CRASHES MAY ENSUE.
|
|
implementation "com.google.android.exoplayer:exoplayer-core:2.18.0"
|
|
implementation fileTree(dir: "libs", include: ["extension-*.aar"])
|
|
|
|
// Image loading
|
|
implementation "io.coil-kt:coil:2.1.0"
|
|
|
|
// Material
|
|
implementation "com.google.android.material:material:1.6.1"
|
|
|
|
// LeakCanary
|
|
debugImplementation "com.squareup.leakcanary:leakcanary-android:2.9.1"
|
|
}
|
|
|
|
spotless {
|
|
kotlin {
|
|
target "src/**/*.kt"
|
|
ktfmt("0.37").dropboxStyle()
|
|
licenseHeaderFile("NOTICE")
|
|
}
|
|
}
|