Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

100 changes: 50 additions & 50 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ plugins {

android {

compileSdk = 34
compileSdk = 35

defaultConfig {
applicationId = "com.simplecityapps.shuttle"
minSdk = 21
targetSdk = 34
targetSdk = 35
versionName = versionName()
versionCode = versionCode()
vectorDrawables.useSupportLibrary = true
Expand Down Expand Up @@ -95,7 +95,7 @@ android {
implementation(project(":android:networking"))

// TagLib
implementation("com.github.timusus:ktaglib:1.4.1")
implementation(libs.timusus.ktaglib)

// Shuttle
implementation(project(":android:data"))
Expand All @@ -121,126 +121,126 @@ android {
implementation(project(":android:trial"))

// RecyclerView FastScroll
implementation("com.github.timusus:RecyclerView-FastScroll:dev-SNAPSHOT")
implementation(libs.timusus.recyclerViewFastScroll)

// AppCompat
implementation("androidx.appcompat:appcompat:1.6.1")
implementation(libs.androidx.appcompat)

// Material
implementation("com.google.android.material:material:1.10.0")
implementation(libs.google.material)


// Constraint Layout
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation(libs.androidx.constraintlayout)

// Android Arch
implementation("androidx.lifecycle:lifecycle-extensions:2.2.0")
implementation(libs.androidx.lifecycle.extensions)

// AndroidX Navigation
implementation("androidx.navigation:navigation-fragment-ktx:2.7.5")
implementation("androidx.navigation:navigation-ui-ktx:2.7.5")
implementation(libs.androidx.navigation.fragment.ktx)
implementation(libs.androidx.navigation.ui.ktx)

// Hilt
implementation("com.google.dagger:hilt-android:2.48.1")
ksp("com.google.dagger:hilt-compiler:2.48.1")
implementation(libs.hilt)
ksp(libs.hilt.compiler)

androidTestImplementation("com.google.dagger:hilt-android-testing:2.48.1")
kspAndroidTest("com.google.dagger:hilt-android-compiler:2.48.1")
androidTestImplementation(libs.hilt.android.testing)
kspAndroidTest(libs.hilt.compiler)

// Leak Canary
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.10")
debugImplementation(libs.leakcanary.android)

// ViewPager 2
implementation("androidx.viewpager2:viewpager2:1.1.0-beta02")
implementation(libs.androidx.viewpager2)

// ViewPager Circle Indicator
implementation("me.relex:circleindicator:2.1.4")
implementation(libs.relex.circleindicator)

// AndroidX Media
implementation("androidx.media:media:1.6.0")
implementation(libs.androidx.media)

// AndroidX Preference
implementation("androidx.preference:preference-ktx:1.2.1")
implementation(libs.androidx.preference.ktx)

// ChromeCast
implementation("com.google.android.gms:play-services-cast-framework:21.3.0")
implementation(libs.google.play.services.cast.framework)

// NanoHttp
implementation("org.nanohttpd:nanohttpd-webserver:2.3.1")
implementation(libs.nanohttpd.webserver)

// Moshi
ksp("com.squareup.moshi:moshi-kotlin-codegen:1.15.0")
ksp(libs.moshi.kotlinCodegen)

// AndroidX Lifecycle
implementation("androidx.lifecycle:lifecycle-common-java8:2.6.2")
implementation(libs.androidx.lifecycle.common.java8)

// Noise
implementation("com.github.paramsen:noise:2.0.0")
implementation(libs.paramsen.noise)

// MpAndroidChart
implementation("com.github.PhilJay:MPAndroidChart:3.1.0")
implementation(libs.philjay.mpAndroidChart)

// AndroidX Lifecycle
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation(libs.androidx.lifecycle.runtime.ktx)

// ExoPlayer
implementation("com.github.timusus.exoplayer:exoplayer-core:2.14.2-shuttle")
implementation("com.github.timusus.exoplayer:exoplayer-hls:2.14.2-shuttle")
implementation(libs.exoplayer.core)
implementation(libs.exoplayer.hls)

implementation("androidx.drawerlayout:drawerlayout:1.2.0")
implementation(libs.androidx.drawerlayout)

// New fragment manager
implementation("androidx.fragment:fragment-ktx:1.6.2")
implementation(libs.androidx.fragment.ktx)

// Glide
implementation("com.github.bumptech.glide:glide:4.16.0")
implementation("com.github.bumptech.glide:okhttp3-integration:4.16.0")
implementation(libs.glide)
implementation(libs.glide.okhttp3Integration)
implementation("com.github.bumptech.glide:recyclerview-integration:4.14.2") {
// Excludes the support library because it's already included by Glide.
isTransitive = false
}

// About Libraries
implementation("com.mikepenz:aboutlibraries-core:10.9.2")
implementation(libs.mikepenz.aboutlibrariesCore)

// Billing
implementation("com.android.billingclient:billing-ktx:6.1.0")
implementation(libs.billingclient.billingKtx)

// Play Core (review api)
implementation("com.google.android.play:core:1.10.3")
implementation("com.google.android.play:core-ktx:1.8.1")
implementation(libs.google.review)
implementation(libs.google.review.ktx)

// Semantic versioning
implementation("com.vdurmont:semver4j:3.1.0")
implementation(libs.vdurmont.semver4j)

implementation("com.microsoft.design:fluent-system-icons:1.1.137@aar")
implementation(libs.design.fluentSystemIcons)

// KotlinX DateTime
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.1")
implementation(libs.kotlinx.datetime)
// Core Library Desugaring - Required for KotlinX DateTime on API < 27
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
coreLibraryDesugaring(libs.tools.desugar.jdk.libs)

// Firebase
implementation(platform("com.google.firebase:firebase-bom:32.6.0"))
implementation("com.google.firebase:firebase-crashlytics")
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.crashlytics)


// Testing
androidTestImplementation("androidx.test:runner:1.5.2")
androidTestImplementation("androidx.test:rules:1.5.0")
androidTestImplementation("androidx.test:core-ktx:1.5.0")
androidTestImplementation("org.hamcrest:hamcrest-library:1.3")
androidTestImplementation(libs.androidx.runner)
androidTestImplementation(libs.androidx.rules)
androidTestImplementation(libs.androidx.core.ktx)
androidTestImplementation(libs.hamcrest.library)

// Remote config
implementation(project(":android:remote-config"))


testImplementation("junit:junit:4.13.2")
testImplementation(libs.junit)

// WorkManager
implementation("androidx.work:work-runtime-ktx:2.9.0-rc01")
implementation("androidx.hilt:hilt-work:1.1.0")
ksp("androidx.hilt:hilt-compiler:1.1.0")
implementation(libs.androidx.work.runtime.ktx)
implementation(libs.androidx.hilt.work)
ksp(libs.androidx.hilt.compiler)
}

buildFeatures.buildConfig = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ abstract class AlbumArtistBinder(
}

override fun getSectionName(): String? {
return albumArtist.groupKey.key?.firstOrNull()?.toUpperCase()?.toString()
return albumArtist.groupKey.key?.firstOrNull()?.uppercaseChar()?.toString()
}

override fun equals(other: Any?): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class ExpandableAlbumBinder(
}

override fun getSectionName(): String? {
return album.groupKey?.key?.firstOrNull()?.toString()?.toUpperCase(Locale.getDefault())
return album.groupKey?.key?.firstOrNull()?.toString()?.uppercase(Locale.getDefault())
}

override fun equals(other: Any?): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.simplecityapps.shuttle.ui.common.recyclerview.SectionViewBinder
import java.util.*

abstract class AlbumBinder(
val album: com.simplecityapps.shuttle.model.Album,
val album: Album,
val imageLoader: ArtworkImageLoader,
val listener: Listener? = null
) : ViewBinder,
Expand All @@ -18,25 +18,25 @@ abstract class AlbumBinder(

interface Listener {
fun onAlbumClicked(
album: com.simplecityapps.shuttle.model.Album,
album: Album,
viewHolder: ViewHolder
)

fun onAlbumLongClicked(
album: com.simplecityapps.shuttle.model.Album,
album: Album,
viewHolder: ViewHolder
)

fun onOverflowClicked(
view: View,
album: com.simplecityapps.shuttle.model.Album
album: Album
) {}

fun onViewHolderCreated(holder: ViewHolder) {}
}

override fun getSectionName(): String? {
return album.groupKey?.key?.firstOrNull()?.toString()?.toUpperCase(Locale.getDefault())
return album.groupKey?.key?.firstOrNull()?.toString()?.uppercase(Locale.getDefault())
}

override fun equals(other: Any?): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ constructor(

override fun getFastscrollPrefix(album: Album): String? {
return when (sortPreferenceManager.sortOrderAlbumList) {
AlbumSortOrder.AlbumName -> album.groupKey?.key?.firstOrNull()?.toString()?.toUpperCase(Locale.getDefault())
AlbumSortOrder.ArtistGroupKey -> album.groupKey?.albumArtistGroupKey?.key?.firstOrNull()?.toString()?.toUpperCase(Locale.getDefault())
AlbumSortOrder.AlbumName -> album.groupKey?.key?.firstOrNull()?.toString()?.uppercase(Locale.getDefault())
AlbumSortOrder.ArtistGroupKey -> album.groupKey?.albumArtistGroupKey?.key?.firstOrNull()?.toString()?.uppercase(Locale.getDefault())
AlbumSortOrder.Year -> album.year.toString()
else -> null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ constructor(
override fun getFastscrollPrefix(song: Song): String? {
return when (sortPreferenceManager.sortOrderSongList) {
SongSortOrder.SongName -> song.name?.firstOrNull()?.toString()
SongSortOrder.ArtistGroupKey -> song.albumArtistGroupKey.key?.firstOrNull()?.toString()?.toUpperCase(Locale.getDefault())
SongSortOrder.AlbumGroupKey -> song.albumGroupKey.key?.firstOrNull()?.toString()?.toUpperCase(Locale.getDefault())
SongSortOrder.ArtistGroupKey -> song.albumArtistGroupKey.key?.firstOrNull()?.toString()?.uppercase(Locale.getDefault())
SongSortOrder.AlbumGroupKey -> song.albumGroupKey.key?.firstOrNull()?.toString()?.uppercase(Locale.getDefault())
SongSortOrder.Year -> song.date?.year?.toString()
else -> null
}
Expand Down
44 changes: 20 additions & 24 deletions android/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ apply plugin: 'kotlin-android'
apply plugin: 'com.google.devtools.ksp'

android {
compileSdk 34
compileSdk 35

defaultConfig {
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
buildConfigField("String", "PROXY_ADDR", "\"192.168.0.14\"")
buildConfigField("Integer", "PROXY_PORT", "8888")
}
Expand Down Expand Up @@ -40,52 +40,48 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

// AndroidX Preferences
implementation "androidx.preference:preference-ktx:1.2.1"
implementation libs.androidx.preference.ktx

// OkHttp Logging Interceptor
api 'com.squareup.okhttp3:logging-interceptor:4.12.0'
api libs.okhttp3.loggingInterceptor

// Kotlin Standard Library
api 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.20'
api libs.kotlin.stdlib

// Kotlin Extensions
api 'androidx.core:core-ktx:1.12.0'
api libs.androidx.core.ktx

// AndroidX Annotations
api "androidx.annotation:annotation:1.7.0"
api libs.androidx.annotation

// Hilt core
implementation 'com.google.dagger:hilt-android:2.48.1'
ksp 'com.google.dagger:hilt-compiler:2.48.1'
implementation libs.hilt
ksp libs.hilt.compiler

// Timber
api 'com.jakewharton.timber:timber:4.7.1'
api libs.timber

// Coroutines
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
api("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
api(libs.kotlinx.coroutinesCore)
api(libs.kotlinx.coroutinesAndroid)

// OKHttp
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation libs.okhttp3.okhttp

// Retrofit
implementation 'com.squareup.retrofit2:converter-moshi:2.10.0-SNAPSHOT'
implementation libs.retrofit2.converterMoshi

// Moshi
implementation 'com.squareup.moshi:moshi:1.15.0'
implementation 'com.squareup.moshi:moshi-kotlin:1.15.0'
implementation 'com.squareup.moshi:moshi-adapters:1.15.0'
implementation libs.moshi
implementation libs.moshi.kotlin
implementation libs.moshi.adapters

// Encrypted Shared Preferences
api 'androidx.security:security-crypto:1.1.0-alpha06'
api libs.androidx.security.crypto

// Material Design Components
implementation 'com.google.android.material:material:1.10.0'
implementation libs.google.material

// Phrase string formatting helper
api 'com.github.square:phrase:master-SNAPSHOT'
api libs.square.phrase
}

repositories {
mavenCentral()
}
4 changes: 2 additions & 2 deletions android/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
minSdk = 21
Expand All @@ -22,6 +22,6 @@ android {
}

dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.1")
implementation(libs.kotlinx.datetime)
}
}
Loading
Loading