
Move the ExoPlayer build process into gradle by leveraging some shell scripting and submodule magic. This more or less kills all windows compatibility, but that is fine. Who even develops on windows?
143 lines
4.4 KiB
Groovy
143 lines
4.4 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
id "kotlin-android"
|
|
id "androidx.navigation.safeargs.kotlin"
|
|
id "com.diffplug.spotless"
|
|
id "kotlin-parcelize"
|
|
id "dagger.hilt.android.plugin"
|
|
id "kotlin-kapt"
|
|
}
|
|
|
|
android {
|
|
compileSdk 33
|
|
namespace "org.oxycblt.auxio"
|
|
|
|
defaultConfig {
|
|
applicationId namespace
|
|
versionName "3.0.2"
|
|
versionCode 26
|
|
|
|
minSdk 21
|
|
targetSdk 33
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
freeCompilerArgs += "-Xjvm-default=all"
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
applicationIdSuffix ".debug"
|
|
versionNameSuffix "-DEBUG"
|
|
}
|
|
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
|
|
|
dependenciesInfo {
|
|
includeInApk = false
|
|
includeInBundle = false
|
|
}
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
}
|
|
|
|
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.4'
|
|
|
|
// --- SUPPORT ---
|
|
|
|
// General
|
|
// 1.4.0 is used in order to avoid a ripple bug in material components
|
|
implementation "androidx.appcompat:appcompat:1.6.1"
|
|
implementation "androidx.core:core-ktx:1.9.0"
|
|
implementation "androidx.activity:activity-ktx:1.6.1"
|
|
implementation "androidx.fragment:fragment-ktx:1.5.5"
|
|
|
|
// 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.1"
|
|
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
|
|
implementation "androidx.media:media:1.6.0"
|
|
|
|
// Preferences
|
|
implementation "androidx.preference:preference-ktx:1.2.0"
|
|
|
|
// Database
|
|
def room_version = '2.5.0'
|
|
implementation "androidx.room:room-runtime:$room_version"
|
|
kapt "androidx.room:room-compiler:$room_version"
|
|
implementation "androidx.room:room-ktx:$room_version"
|
|
|
|
// --- 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 project(":exoplayer-library-core")
|
|
implementation project(":exoplayer-extension-ffmpeg")
|
|
|
|
// Image loading
|
|
implementation "io.coil-kt:coil-base:2.2.0"
|
|
|
|
// Material
|
|
// TODO: Stuck on 1.8.0-alpha01 until ripple bug with tab layout can be worked around
|
|
// TODO: Exactly figure out the conditions that the 1.7.0 ripple bug occurred so you can just
|
|
// PR a fix.
|
|
implementation "com.google.android.material:material:1.8.0-alpha01"
|
|
|
|
// Dependency Injection
|
|
def dagger_version = "2.44.2"
|
|
implementation "com.google.dagger:dagger:$dagger_version"
|
|
kapt "com.google.dagger:dagger-compiler:$dagger_version"
|
|
implementation "com.google.dagger:hilt-android:$hilt_version"
|
|
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"
|
|
// Testing
|
|
debugImplementation "com.squareup.leakcanary:leakcanary-android:2.9.1"
|
|
testImplementation "junit:junit:4.13.2"
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
}
|
|
|
|
spotless {
|
|
kotlin {
|
|
target "src/**/*.kt"
|
|
ktfmt().dropboxStyle()
|
|
licenseHeaderFile("NOTICE")
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
preDebugBuild.dependsOn spotlessApply
|
|
}
|