
Completely rework the ID system to pave the way to MusicBrainz ID support and greatly increase ID integrity in general. This changeset removes the old ID field, an emulation of a polynomial hash that was used in all items, and replaces it with a new type called UID that is specific to Music. Other types just use plain equals now, and most instances of "id" to check for equality in the app have either been inlined into an equals override or removed outright. The new UID format is as follows: datatype/format:uuid Datatype is a tag that is just the lowercase tag name. For example, "song". Format is the program that created the UID. auxio will be an md5 hash, and musicbrainz will the a musicbrainz ID extracted from a file. UUID is the uuid itself. This is much more reliable and extendable than the old ID format. This will also be the last time I break compat with old ID formats. From now on, a legacy UID field will not be included to enable backwards compat, when the time comes for a breaking change.
126 lines
3.6 KiB
Groovy
126 lines
3.6 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
id "kotlin-android"
|
|
id "androidx.navigation.safeargs.kotlin"
|
|
id "com.diffplug.spotless"
|
|
id "kotlin-parcelize"
|
|
}
|
|
|
|
android {
|
|
compileSdk 33
|
|
namespace "org.oxycblt.auxio"
|
|
|
|
defaultConfig {
|
|
applicationId namespace
|
|
versionName "2.6.3"
|
|
versionCode 22
|
|
|
|
minSdk 21
|
|
// API 33 is still busted, waiting until the XML element issue is fixed
|
|
// noinspection OldTargetApi
|
|
targetSdk 33
|
|
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
}
|
|
|
|
// ExoPlayer, AndroidX, and Material Components all need Java 8 to compile.
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
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"
|
|
}
|
|
}
|
|
|
|
dependenciesInfo {
|
|
includeInApk = false
|
|
includeInBundle = false
|
|
}
|
|
}
|
|
|
|
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.4'
|
|
|
|
// --- SUPPORT ---
|
|
|
|
// General
|
|
// 1.4.0 is used in order to avoid a ripple bug in material components
|
|
implementation "androidx.appcompat:appcompat:1.4.0"
|
|
implementation "androidx.core:core-ktx:1.8.0"
|
|
implementation "androidx.activity:activity-ktx:1.6.0-rc01"
|
|
implementation "androidx.fragment:fragment-ktx:1.5.2"
|
|
|
|
// 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"
|
|
|
|
// --- 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.1"
|
|
|
|
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.7.0-alpha02"
|
|
|
|
// LeakCanary
|
|
debugImplementation "com.squareup.leakcanary:leakcanary-android:2.9.1"
|
|
}
|
|
|
|
spotless {
|
|
kotlin {
|
|
target "src/**/*.kt"
|
|
ktfmt("0.37").dropboxStyle()
|
|
licenseHeaderFile("NOTICE")
|
|
}
|
|
}
|