
Create a custom session connector that connects between PlaybackStateManager and MediaSession. The previous session connector that was part of the exoplayer library turned out to cause bugs that could cause the covert art not to show on the lock screen and to not be recognized as proper player controls. This new connector [once complete] should fix these issues.
127 lines
3.4 KiB
Groovy
127 lines
3.4 KiB
Groovy
apply plugin: "com.android.application"
|
|
apply plugin: "kotlin-android"
|
|
apply plugin: "kotlin-kapt"
|
|
apply plugin: "androidx.navigation.safeargs.kotlin"
|
|
|
|
android {
|
|
compileSdkVersion 30
|
|
buildToolsVersion "30.0.3"
|
|
|
|
defaultConfig {
|
|
applicationId "org.oxycblt.auxio"
|
|
versionName "1.4.0"
|
|
versionCode 6
|
|
|
|
minSdkVersion 21
|
|
targetSdkVersion 30
|
|
|
|
buildFeatures {
|
|
dataBinding true
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
debuggable true
|
|
applicationIdSuffix = ".debug"
|
|
versionNameSuffix = "-DEBUG"
|
|
}
|
|
|
|
release {
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
|
}
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
|
|
compileOptions {
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
ktlint
|
|
}
|
|
|
|
afterEvaluate {
|
|
preDebugBuild.dependsOn ktlintFormat
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
|
|
|
// 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"
|
|
|
|
// --- SUPPORT ---
|
|
|
|
// General
|
|
implementation "androidx.core:core-ktx:1.5.0"
|
|
implementation "androidx.activity:activity-ktx:1.2.3"
|
|
implementation 'androidx.fragment:fragment-ktx:1.3.4'
|
|
|
|
// UI
|
|
implementation "androidx.recyclerview:recyclerview:1.2.0"
|
|
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
|
|
implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"
|
|
|
|
// Lifecycle
|
|
def lifecycle_version = "2.3.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-livedata-ktx:$lifecycle_version"
|
|
|
|
// Navigation
|
|
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
|
|
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
|
|
|
|
// Media
|
|
// TODO: Migrate to media2 when I can figure out how to use it
|
|
implementation "androidx.media:media:1.3.1"
|
|
|
|
// Preferences
|
|
implementation "androidx.preference:preference-ktx:1.1.1"
|
|
|
|
// --- THIRD PARTY ---
|
|
|
|
// ExoPlayer
|
|
def exoplayer_version = "2.14.0"
|
|
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
|
|
|
|
// Image loading
|
|
implementation "io.coil-kt:coil:1.2.1"
|
|
|
|
// Material
|
|
implementation "com.google.android.material:material:1.3.0"
|
|
|
|
// --- DEBUG ---
|
|
|
|
// Lint
|
|
ktlint 'com.pinterest:ktlint:0.41.0'
|
|
|
|
// Memory Leak checking
|
|
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
|
|
}
|
|
|
|
task ktlint(type: JavaExec, group: "verification") {
|
|
description = "Check Kotlin code style."
|
|
main = "com.pinterest.ktlint.Main"
|
|
classpath = configurations.ktlint
|
|
|
|
args "src/**/*.kt"
|
|
}
|
|
check.dependsOn ktlint
|
|
|
|
task ktlintFormat(type: JavaExec, group: "formatting") {
|
|
description = "Fix Kotlin code style deviations."
|
|
main = "com.pinterest.ktlint.Main"
|
|
classpath = configurations.ktlint
|
|
|
|
args "-F", "src/**/*.kt"
|
|
}
|