diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index b589d56..b86273d 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 8978d23..74dd639 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,7 @@
+
-
+
diff --git a/.idea/other.xml b/.idea/other.xml
index 82bbc40..e6f499b 100644
--- a/.idea/other.xml
+++ b/.idea/other.xml
@@ -1,265 +1,6 @@
-
\ No newline at end of file
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 1c9d51d..b18fa8b 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -91,11 +91,11 @@ android {
}
}
compileOptions {
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
+ sourceCompatibility = JavaVersion.VERSION_21
+ targetCompatibility = JavaVersion.VERSION_21
}
kotlinOptions {
- jvmTarget = "17"
+ jvmTarget = "21"
freeCompilerArgs = listOf("-Xcontext-receivers", "-XXLanguage:+ExplicitBackingFields")
}
buildFeatures {
diff --git a/app/mediaplayer/build.gradle.kts b/app/mediaplayer/build.gradle.kts
index f47ad51..d0bec20 100644
--- a/app/mediaplayer/build.gradle.kts
+++ b/app/mediaplayer/build.gradle.kts
@@ -27,11 +27,11 @@ android {
}
}
compileOptions {
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
+ sourceCompatibility = JavaVersion.VERSION_21
+ targetCompatibility = JavaVersion.VERSION_21
}
kotlinOptions {
- jvmTarget = "17"
+ jvmTarget = "21"
}
}
diff --git a/app/src/main/java/com/bobbyesp/metadator/ext/Any.kt b/app/src/main/java/com/bobbyesp/metadator/ext/Any.kt
deleted file mode 100644
index 55d2fb1..0000000
--- a/app/src/main/java/com/bobbyesp/metadator/ext/Any.kt
+++ /dev/null
@@ -1,3 +0,0 @@
-package com.bobbyesp.metadator.ext
-
-fun Any.formatAsClassToRoute(): String = this::class.qualifiedName.toString()
\ No newline at end of file
diff --git a/app/src/main/java/com/bobbyesp/metadator/ext/KClass.kt b/app/src/main/java/com/bobbyesp/metadator/ext/KClass.kt
index 0421862..9692727 100644
--- a/app/src/main/java/com/bobbyesp/metadator/ext/KClass.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/ext/KClass.kt
@@ -2,4 +2,4 @@ package com.bobbyesp.metadator.ext
import kotlin.reflect.KClass
-fun KClass<*>.formatToRoute(): String = this.qualifiedName.toString()
\ No newline at end of file
+fun KClass<*>.qualifiedName(): String = this.qualifiedName.toString()
\ No newline at end of file
diff --git a/app/src/main/java/com/bobbyesp/metadator/ext/MediaItem.kt b/app/src/main/java/com/bobbyesp/metadator/ext/MediaItem.kt
index f45198f..98e596b 100644
--- a/app/src/main/java/com/bobbyesp/metadator/ext/MediaItem.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/ext/MediaItem.kt
@@ -1,7 +1,7 @@
package com.bobbyesp.metadator.ext
import androidx.media3.common.MediaItem
-import com.bobbyesp.model.Song
+import com.bobbyesp.utilities.model.Song
fun MediaItem.toSong(): Song {
val mediaMetadata =
diff --git a/app/src/main/java/com/bobbyesp/metadator/ext/Song.kt b/app/src/main/java/com/bobbyesp/metadator/ext/Song.kt
index 30c1530..3c604fd 100644
--- a/app/src/main/java/com/bobbyesp/metadator/ext/Song.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/ext/Song.kt
@@ -1,7 +1,7 @@
package com.bobbyesp.metadator.ext
import com.bobbyesp.metadator.model.ParcelableSong
-import com.bobbyesp.model.Song
+import com.bobbyesp.utilities.model.Song
fun Song.toParcelableSong(): ParcelableSong {
val artistsList = this.artist.toList()
diff --git a/app/src/main/java/com/bobbyesp/metadator/model/ParcelableSong.kt b/app/src/main/java/com/bobbyesp/metadator/model/ParcelableSong.kt
index 3f0d3e5..9245575 100644
--- a/app/src/main/java/com/bobbyesp/metadator/model/ParcelableSong.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/model/ParcelableSong.kt
@@ -3,7 +3,7 @@ package com.bobbyesp.metadator.model
import android.net.Uri
import android.os.Parcelable
import androidx.compose.runtime.Immutable
-import com.bobbyesp.model.UriSerializer
+import com.bobbyesp.utilities.model.UriSerializer
import kotlinx.parcelize.Parcelize
import kotlinx.serialization.Serializable
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/Navigation.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/Navigation.kt
index 3ea89c6..24a9435 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/Navigation.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/Navigation.kt
@@ -14,8 +14,10 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.only
import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.safeDrawing
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Settings
import androidx.compose.material.icons.rounded.Square
@@ -42,6 +44,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalDensity
+import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.role
@@ -61,7 +64,6 @@ import androidx.navigation.compose.navigation
import androidx.navigation.toRoute
import com.bobbyesp.metadator.App
import com.bobbyesp.metadator.R
-import com.bobbyesp.metadator.ext.formatAsClassToRoute
import com.bobbyesp.metadator.model.ParcelableSong
import com.bobbyesp.metadator.presentation.common.DestinationInfo
import com.bobbyesp.metadator.presentation.common.LocalDrawerState
@@ -69,14 +71,14 @@ import com.bobbyesp.metadator.presentation.common.LocalNavController
import com.bobbyesp.metadator.presentation.common.LocalPlayerAwareWindowInsets
import com.bobbyesp.metadator.presentation.common.LocalSnackbarHostState
import com.bobbyesp.metadator.presentation.common.Route
-import com.bobbyesp.metadator.presentation.common.parcelableType
+import com.bobbyesp.metadator.presentation.common.qualifiedName
import com.bobbyesp.metadator.presentation.common.routesToNavigate
import com.bobbyesp.metadator.presentation.pages.MediaStorePageViewModel
import com.bobbyesp.metadator.presentation.pages.home.HomePage
import com.bobbyesp.metadator.presentation.pages.mediaplayer.MediaplayerPage
import com.bobbyesp.metadator.presentation.pages.mediaplayer.MediaplayerViewModel
-import com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.CollapsedPlayerHeight
-import com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.PlayerAnimationSpec
+import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.CollapsedPlayerHeight
+import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.PlayerAnimationSpec
import com.bobbyesp.metadator.presentation.pages.settings.SettingsPage
import com.bobbyesp.metadator.presentation.pages.utilities.tageditor.ID3MetadataEditorPage
import com.bobbyesp.metadator.presentation.pages.utilities.tageditor.ID3MetadataEditorPageViewModel
@@ -84,6 +86,7 @@ import com.bobbyesp.ui.components.bottomsheet.draggable.rememberDraggableBottomS
import com.bobbyesp.ui.components.tags.RoundedTag
import com.bobbyesp.ui.motion.animatedComposable
import com.bobbyesp.ui.motion.slideInVerticallyComposable
+import com.bobbyesp.utilities.navigation.parcelableType
import kotlinx.coroutines.launch
import kotlin.reflect.typeOf
@@ -112,20 +115,20 @@ fun Navigator() {
//able to open drawer when the user is in one of the main routes (root routes)
val canOpenDrawer by remember(currentRoute) {
- mutableStateOf(routesToNavigate.fastAny { it.formatAsClassToRoute() == currentRootRoute.value })
+ mutableStateOf(routesToNavigate.fastAny { it.qualifiedName() == currentRootRoute.value })
}
val mediaStoreViewModel = hiltViewModel()
val mediaplayerViewModel = hiltViewModel()
+ val density = LocalDensity.current
+ val windowsInsets = WindowInsets.systemBars
+
BoxWithConstraints(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colorScheme.background)
) {
- val density = LocalDensity.current
- val windowsInsets = WindowInsets.systemBars
-
val bottomInset = with(density) { windowsInsets.getBottom(density).toDp() }
val mediaPlayerSheetState = rememberDraggableBottomSheetState(
dismissedBound = 0.dp,
@@ -156,15 +159,17 @@ fun Navigator() {
.add(WindowInsets(bottom = insetsBottom))
}
-
CompositionLocalProvider(
LocalPlayerAwareWindowInsets provides playerAwareWindowInsets
) {
ModalNavigationDrawer(
+ modifier = Modifier,
drawerState = drawerState,
gesturesEnabled = canOpenDrawer,
drawerContent = {
- ModalDrawerSheet {
+ ModalDrawerSheet(
+ modifier = Modifier,
+ ) {
Text(
modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp),
text = stringResource(id = R.string.app_name).uppercase(),
@@ -175,7 +180,7 @@ fun Navigator() {
fontFamily = FontFamily.Monospace
)
routesToNavigate.fastForEach { route ->
- val formattedRoute = route.formatAsClassToRoute()
+ val formattedRoute = route.qualifiedName()
val isSelected = currentRootRoute.value == formattedRoute
val destinationInfo = DestinationInfo.fromRoute(route)
NavigationDrawerItem(
@@ -275,18 +280,31 @@ fun Navigator() {
}
},
) {
- Scaffold(snackbarHost = {
- SnackbarHost(
- hostState = snackbarHostState
- ) { dataReceived ->
- Snackbar(
- modifier = Modifier,
- snackbarData = dataReceived,
- containerColor = MaterialTheme.colorScheme.inverseSurface,
- contentColor = MaterialTheme.colorScheme.inverseOnSurface,
+ Scaffold(
+ modifier = Modifier.windowInsetsPadding(
+ insets = WindowInsets(
+ left = WindowInsets.safeDrawing.getLeft(
+ density,
+ layoutDirection = LocalLayoutDirection.current
+ ),
+ right = WindowInsets.safeDrawing.getRight(
+ density,
+ layoutDirection = LocalLayoutDirection.current
+ ),
)
- }
- }) {
+ ),
+ snackbarHost = {
+ SnackbarHost(
+ hostState = snackbarHostState
+ ) { dataReceived ->
+ Snackbar(
+ modifier = Modifier,
+ snackbarData = dataReceived,
+ containerColor = MaterialTheme.colorScheme.inverseSurface,
+ contentColor = MaterialTheme.colorScheme.inverseOnSurface,
+ )
+ }
+ }) {
NavHost(
modifier = Modifier
.fillMaxWidth()
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/utils/Animations.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/common/Animations.kt
similarity index 89%
rename from app/src/main/java/com/bobbyesp/metadator/presentation/utils/Animations.kt
rename to app/src/main/java/com/bobbyesp/metadator/presentation/common/Animations.kt
index e747caa..a3c64c9 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/utils/Animations.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/common/Animations.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.metadator.presentation.utils
+package com.bobbyesp.metadator.presentation.common
import androidx.compose.animation.BoundsTransform
import androidx.compose.animation.ExperimentalSharedTransitionApi
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/common/Route.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/common/Route.kt
index 577a048..2e25574 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/common/Route.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/common/Route.kt
@@ -36,4 +36,6 @@ sealed interface Route {
val routesToNavigate = listOf(
Route.MetadatorNavigator,
Route.MediaplayerNavigator
-)
\ No newline at end of file
+)
+
+fun Any.qualifiedName(): String = this::class.qualifiedName.toString()
\ No newline at end of file
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/HorizontalSongCard.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/HorizontalSongCard.kt
index 57d90e5..6ba6543 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/HorizontalSongCard.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/HorizontalSongCard.kt
@@ -20,9 +20,9 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage
import com.bobbyesp.metadator.presentation.theme.MetadatorTheme
-import com.bobbyesp.model.Song
import com.bobbyesp.ui.components.text.MarqueeText
import com.bobbyesp.utilities.Time
+import com.bobbyesp.utilities.model.Song
@Composable
fun HorizontalSongCard(
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/VerticalSongCard.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/VerticalSongCard.kt
index 0bc0a3a..c7f7828 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/VerticalSongCard.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/components/cards/songs/VerticalSongCard.kt
@@ -17,8 +17,8 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage
import com.bobbyesp.metadator.presentation.theme.MetadatorTheme
-import com.bobbyesp.model.Song
import com.bobbyesp.ui.components.text.MarqueeText
+import com.bobbyesp.utilities.model.Song
@Composable
fun VerticalSongCard(
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStorePage.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStorePage.kt
index ef9668e..84e217e 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStorePage.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStorePage.kt
@@ -22,11 +22,12 @@ import com.bobbyesp.metadator.presentation.components.cards.songs.HorizontalSong
import com.bobbyesp.metadator.presentation.components.cards.songs.VerticalSongCard
import com.bobbyesp.metadator.presentation.components.others.status.EmptyMediaStore
import com.bobbyesp.metadator.presentation.pages.home.LayoutType
-import com.bobbyesp.model.Song
+import com.bobbyesp.utilities.model.Song
import com.bobbyesp.utilities.states.ResourceState
import my.nanihadesuka.compose.LazyColumnScrollbar
-import my.nanihadesuka.compose.LazyGridVerticalScrollbar
+import my.nanihadesuka.compose.LazyVerticalGridScrollbar
import my.nanihadesuka.compose.ScrollbarSelectionActionable
+import my.nanihadesuka.compose.ScrollbarSettings
@Composable
fun MediaStorePage(
@@ -63,11 +64,12 @@ fun MediaStorePage(
val songs = songsState.data!!
when (type) {
LayoutType.Grid -> {
- LazyGridVerticalScrollbar(
+ LazyVerticalGridScrollbar(
state = lazyGridState,
- thumbColor = MaterialTheme.colorScheme.onSurfaceVariant,
- thumbSelectedColor = MaterialTheme.colorScheme.primary,
- selectionActionable = ScrollbarSelectionActionable.WhenVisible,
+ settings = ScrollbarSettings(
+ thumbSelectedColor = MaterialTheme.colorScheme.primary,
+ selectionActionable = ScrollbarSelectionActionable.WhenVisible,
+ )
) {
LazyVerticalGrid(
columns = GridCells.Adaptive(125.dp),
@@ -97,10 +99,11 @@ fun MediaStorePage(
LayoutType.List -> {
LazyColumnScrollbar(
- listState = lazyListState,
- thumbColor = MaterialTheme.colorScheme.onSurfaceVariant,
- thumbSelectedColor = MaterialTheme.colorScheme.primary,
- selectionActionable = ScrollbarSelectionActionable.WhenVisible,
+ state = lazyListState,
+ settings = ScrollbarSettings(
+ thumbSelectedColor = MaterialTheme.colorScheme.primary,
+ selectionActionable = ScrollbarSelectionActionable.WhenVisible,
+ )
) {
LazyColumn(
modifier = Modifier
@@ -112,13 +115,15 @@ fun MediaStorePage(
key = { index -> songs[index].id },
contentType = { index -> songs[index].id.toString() }) { index ->
val song = songs[index]
- HorizontalSongCard(song = song,
+ HorizontalSongCard(
+ song = song,
modifier = Modifier.animateItem(
fadeInSpec = null, fadeOutSpec = null
),
onClick = {
onItemClicked(song)
- })
+ }
+ )
}
}
}
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStoreViewModel.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStoreViewModel.kt
index f625c78..8e3b822 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStoreViewModel.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/MediaStoreViewModel.kt
@@ -3,8 +3,8 @@ package com.bobbyesp.metadator.presentation.pages
import android.content.Context
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
-import com.bobbyesp.model.Song
import com.bobbyesp.utilities.mediastore.MediaStoreReceiver.Advanced.observeSongs
+import com.bobbyesp.utilities.model.Song
import com.bobbyesp.utilities.states.ResourceState
import dagger.hilt.android.lifecycle.HiltViewModel
import dagger.hilt.android.qualifiers.ApplicationContext
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerPage.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerPage.kt
index 1ced28b..500b47b 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerPage.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerPage.kt
@@ -40,11 +40,12 @@ import com.bobbyesp.metadator.R
import com.bobbyesp.metadator.presentation.common.LocalDrawerState
import com.bobbyesp.metadator.presentation.common.LocalPlayerAwareWindowInsets
import com.bobbyesp.metadator.presentation.components.cards.songs.HorizontalSongCard
-import com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.MediaplayerSheet
+import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.MediaplayerSheet
import com.bobbyesp.ui.components.bottomsheet.draggable.DraggableBottomSheetState
import kotlinx.coroutines.launch
import my.nanihadesuka.compose.LazyColumnScrollbar
import my.nanihadesuka.compose.ScrollbarSelectionActionable
+import my.nanihadesuka.compose.ScrollbarSettings
@OptIn(ExperimentalMaterial3Api::class)
@Composable
@@ -125,10 +126,11 @@ fun MediaplayerPage(
.padding(it)
) {
LazyColumnScrollbar(
- listState = mediaStoreLazyColumnState,
- thumbColor = MaterialTheme.colorScheme.onSurfaceVariant,
- thumbSelectedColor = MaterialTheme.colorScheme.primary,
- selectionActionable = ScrollbarSelectionActionable.WhenVisible,
+ state = mediaStoreLazyColumnState,
+ settings = ScrollbarSettings(
+ thumbSelectedColor = MaterialTheme.colorScheme.primary,
+ selectionActionable = ScrollbarSelectionActionable.WhenVisible,
+ ),
) {
LazyColumn(
modifier = Modifier
@@ -141,7 +143,8 @@ fun MediaplayerPage(
key = { index -> songs[index].id },
contentType = { index -> songs[index].id.toString() }) { index ->
val song = songs[index]
- HorizontalSongCard(song = song,
+ HorizontalSongCard(
+ song = song,
modifier = Modifier.animateItem(
fadeInSpec = null,
fadeOutSpec = null
@@ -152,7 +155,8 @@ fun MediaplayerPage(
if (mediaPlayerSheetState.isDismissed) {
mediaPlayerSheetState.collapseSoft()
}
- })
+ }
+ )
}
}
}
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerViewModel.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerViewModel.kt
index 3e277bb..b384c01 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerViewModel.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/MediaplayerViewModel.kt
@@ -16,10 +16,10 @@ import com.bobbyesp.mediaplayer.service.MediaServiceHandler
import com.bobbyesp.mediaplayer.service.MediaState
import com.bobbyesp.mediaplayer.service.PlayerEvent
import com.bobbyesp.mediaplayer.service.queue.SongsQueue
-import com.bobbyesp.model.Song
import com.bobbyesp.utilities.Time.formatDuration
import com.bobbyesp.utilities.mediastore.MediaStoreReceiver.Advanced.getSongs
import com.bobbyesp.utilities.mediastore.MediaStoreReceiver.Advanced.observeSongs
+import com.bobbyesp.utilities.model.Song
import dagger.hilt.android.lifecycle.HiltViewModel
import dagger.hilt.android.qualifiers.ApplicationContext
import kotlinx.coroutines.Dispatchers
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/MediaplayerSheetView.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/MediaplayerSheetView.kt
deleted file mode 100644
index c2107fb..0000000
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/MediaplayerSheetView.kt
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer
-
-enum class MediaplayerSheetView {
- FULL_PLAYER,
- QUEUE
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/MediaplayerConstants.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerConstants.kt
similarity index 88%
rename from app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/MediaplayerConstants.kt
rename to app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerConstants.kt
index 2b2b281..5440329 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/MediaplayerConstants.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerConstants.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer
+package com.bobbyesp.metadator.presentation.pages.mediaplayer.player
import androidx.compose.animation.ContentTransform
import androidx.compose.animation.SizeTransform
@@ -10,7 +10,7 @@ import androidx.compose.ui.unit.dp
import com.bobbyesp.ui.motion.materialSharedAxisXIn
import com.bobbyesp.ui.motion.materialSharedAxisXOut
-val CollapsedPlayerHeight = 84.dp
+val CollapsedPlayerHeight = 78.dp
val SeekToButtonSize = 48.dp
val PlayerCommandsButtonSize = 48.dp
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/MediaplayerSheet.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerSheet.kt
similarity index 84%
rename from app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/MediaplayerSheet.kt
rename to app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerSheet.kt
index a148f51..ff1a8c3 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/MediaplayerSheet.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerSheet.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer
+package com.bobbyesp.metadator.presentation.pages.mediaplayer.player
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
@@ -7,8 +7,8 @@ import androidx.compose.ui.Modifier
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.bobbyesp.mediaplayer.service.ConnectionState
import com.bobbyesp.metadator.presentation.pages.mediaplayer.MediaplayerViewModel
-import com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.views.MediaplayerCollapsedContent
-import com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.views.MediaplayerExpandedContent
+import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.views.MediaplayerCollapsedContent
+import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.views.MediaplayerExpandedContent
import com.bobbyesp.ui.components.bottomsheet.draggable.DraggableBottomSheet
import com.bobbyesp.ui.components.bottomsheet.draggable.DraggableBottomSheetState
import kotlinx.coroutines.launch
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerSheetView.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerSheetView.kt
new file mode 100644
index 0000000..ef7b31c
--- /dev/null
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/MediaplayerSheetView.kt
@@ -0,0 +1,6 @@
+package com.bobbyesp.metadator.presentation.pages.mediaplayer.player
+
+enum class MediaplayerSheetView {
+ FULL_PLAYER,
+ QUEUE
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/PlayerControls.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/PlayerControls.kt
similarity index 99%
rename from app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/PlayerControls.kt
rename to app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/PlayerControls.kt
index aa2b772..fe9f246 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/PlayerControls.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/PlayerControls.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer
+package com.bobbyesp.metadator.presentation.pages.mediaplayer.player
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.core.EaseInOutSine
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/PlayerOptions.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/PlayerOptions.kt
similarity index 96%
rename from app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/PlayerOptions.kt
rename to app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/PlayerOptions.kt
index 331f4dd..06e5a52 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/PlayerOptions.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/PlayerOptions.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer
+package com.bobbyesp.metadator.presentation.pages.mediaplayer.player
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/MediaplayerCollapsedContent.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MediaplayerCollapsedContent.kt
similarity index 93%
rename from app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/MediaplayerCollapsedContent.kt
rename to app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MediaplayerCollapsedContent.kt
index a7ee0be..c47e018 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/MediaplayerCollapsedContent.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MediaplayerCollapsedContent.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.views
+package com.bobbyesp.metadator.presentation.pages.mediaplayer.player.views
import android.content.res.Configuration
import androidx.compose.foundation.layout.Box
@@ -19,7 +19,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.media3.common.MediaItem
import androidx.media3.common.MediaMetadata
import com.bobbyesp.metadator.presentation.pages.mediaplayer.MediaplayerViewModel
-import com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.CollapsedPlayerHeight
+import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.CollapsedPlayerHeight
import com.bobbyesp.metadator.presentation.theme.MetadatorTheme
@Composable
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/MediaplayerExpandedContent.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MediaplayerExpandedContent.kt
similarity index 97%
rename from app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/MediaplayerExpandedContent.kt
rename to app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MediaplayerExpandedContent.kt
index c7a4a33..cd36b08 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/MediaplayerExpandedContent.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MediaplayerExpandedContent.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.views
+package com.bobbyesp.metadator.presentation.pages.mediaplayer.player.views
import android.content.res.Configuration
import androidx.activity.compose.BackHandler
@@ -48,8 +48,8 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.bobbyesp.metadator.R
import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage
import com.bobbyesp.metadator.presentation.pages.mediaplayer.MediaplayerViewModel
-import com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.MediaplayerSheetView
-import com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.PlayerControls
+import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.MediaplayerSheetView
+import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.PlayerControls
import com.bobbyesp.ui.components.bottomsheet.draggable.DraggableBottomSheetState
import com.bobbyesp.ui.motion.MotionConstants
import com.bobbyesp.ui.motion.tweenEnter
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/MiniplayerContent.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MiniplayerContent.kt
similarity index 96%
rename from app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/MiniplayerContent.kt
rename to app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MiniplayerContent.kt
index 5db4e54..ec282b3 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/MiniplayerContent.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/MiniplayerContent.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.views
+package com.bobbyesp.metadator.presentation.pages.mediaplayer.player.views
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.core.MutableTransitionState
@@ -31,7 +31,7 @@ import androidx.compose.ui.unit.sp
import androidx.media3.common.MediaMetadata
import com.bobbyesp.metadator.R
import com.bobbyesp.metadator.presentation.components.image.ArtworkAsyncImage
-import com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.AnimatedTextContentTransformation
+import com.bobbyesp.metadator.presentation.pages.mediaplayer.player.AnimatedTextContentTransformation
import com.bobbyesp.ui.components.button.DynamicButton
import com.bobbyesp.ui.components.text.MarqueeText
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/PlayerQueue.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/PlayerQueue.kt
similarity index 93%
rename from app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/PlayerQueue.kt
rename to app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/PlayerQueue.kt
index b6d792d..6f12490 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/mediaplayer/views/PlayerQueue.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/mediaplayer/player/views/PlayerQueue.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.metadator.presentation.pages.mediaplayer.mediaplayer.views
+package com.bobbyesp.metadator.presentation.pages.mediaplayer.player.views
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.layout.Box
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/lyricseditor/LyricsEditorPage.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/lyricseditor/LyricsEditorPage.kt
new file mode 100644
index 0000000..f67950f
--- /dev/null
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/lyricseditor/LyricsEditorPage.kt
@@ -0,0 +1,9 @@
+package com.bobbyesp.metadator.presentation.pages.utilities.lyricseditor
+
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+
+@Composable
+fun LyricsEditorPage(modifier: Modifier = Modifier) {
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPage.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPage.kt
index 5f43d30..f83d9fc 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPage.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPage.kt
@@ -63,9 +63,6 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
-import com.bobbyesp.ext.toAudioFileMetadata
-import com.bobbyesp.ext.toMinutes
-import com.bobbyesp.ext.toModifiableMap
import com.bobbyesp.metadator.R
import com.bobbyesp.metadator.model.ParcelableSong
import com.bobbyesp.metadator.presentation.common.LocalNavController
@@ -76,6 +73,9 @@ import com.bobbyesp.ui.components.others.MetadataTag
import com.bobbyesp.ui.components.text.LargeCategoryTitle
import com.bobbyesp.ui.components.text.MarqueeText
import com.bobbyesp.ui.components.text.PreConfiguredOutlinedTextField
+import com.bobbyesp.utilities.ext.toAudioFileMetadata
+import com.bobbyesp.utilities.ext.toMinutes
+import com.bobbyesp.utilities.ext.toModifiableMap
import com.bobbyesp.utilities.mediastore.AudioFileMetadata.Companion.toAudioFileMetadata
import com.bobbyesp.utilities.mediastore.AudioFileMetadata.Companion.toPropertyMap
import kotlinx.coroutines.Dispatchers
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPageViewModel.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPageViewModel.kt
index 3cbc31a..065dd3c 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPageViewModel.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/ID3MetadataEditorPageViewModel.kt
@@ -8,7 +8,7 @@ import android.os.Build
import android.util.Log
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
-import com.bobbyesp.ext.toModifiableMap
+import com.bobbyesp.utilities.ext.toModifiableMap
import com.bobbyesp.utilities.mediastore.AudioFileMetadata.Companion.toAudioFileMetadata
import com.bobbyesp.utilities.mediastore.AudioFileMetadata.Companion.toPropertyMap
import com.bobbyesp.utilities.mediastore.MediaStoreReceiver
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/spotify/stages/SpMetadataBsSearch.kt b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/spotify/stages/SpMetadataBsSearch.kt
index 558a7ca..5c7883a 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/spotify/stages/SpMetadataBsSearch.kt
+++ b/app/src/main/java/com/bobbyesp/metadator/presentation/pages/utilities/tageditor/spotify/stages/SpMetadataBsSearch.kt
@@ -30,7 +30,7 @@ import androidx.paging.compose.itemKey
import com.bobbyesp.metadator.R
import com.bobbyesp.metadator.presentation.components.cards.songs.spotify.SpotifyHorizontalSongCard
import com.bobbyesp.metadator.presentation.pages.utilities.tageditor.spotify.SpMetadataBottomSheetContentViewModel
-import com.bobbyesp.metadator.presentation.utils.pagination.pagingStateHandler
+import com.bobbyesp.utilities.ui.pagingStateHandler
@OptIn(ExperimentalFoundationApi::class)
@Composable
diff --git a/app/ui/build.gradle.kts b/app/ui/build.gradle.kts
index dc65358..c2ac80b 100644
--- a/app/ui/build.gradle.kts
+++ b/app/ui/build.gradle.kts
@@ -32,11 +32,11 @@ android {
}
}
compileOptions {
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
+ sourceCompatibility = JavaVersion.VERSION_21
+ targetCompatibility = JavaVersion.VERSION_21
}
kotlinOptions {
- jvmTarget = "17"
+ jvmTarget = "21"
}
buildFeatures {
compose = true
diff --git a/app/utilities/build.gradle.kts b/app/utilities/build.gradle.kts
index 96f7ea3..df0c5cd 100644
--- a/app/utilities/build.gradle.kts
+++ b/app/utilities/build.gradle.kts
@@ -27,18 +27,19 @@ android {
}
}
compileOptions {
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
+ sourceCompatibility = JavaVersion.VERSION_21
+ targetCompatibility = JavaVersion.VERSION_21
}
buildFeatures {
compose = true
+ buildConfig = true
}
composeCompiler {
enableStrongSkippingMode = true
reportsDestination = layout.buildDirectory.dir("compose_compiler")
}
kotlinOptions {
- jvmTarget = "17"
+ jvmTarget = "21"
}
}
@@ -49,6 +50,8 @@ dependencies {
implementation(libs.mmkv)
implementation(libs.bundles.compose)
implementation(libs.compose.ui.utilities)
+ implementation(libs.paging.compose)
+ implementation(libs.paging.runtime)
implementation(libs.material)
implementation(libs.coil)
implementation(libs.bundles.coroutines)
diff --git a/app/utilities/src/main/java/com/bobbyesp/utilities/List.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/ConcurrentList.kt
similarity index 100%
rename from app/utilities/src/main/java/com/bobbyesp/utilities/List.kt
rename to app/utilities/src/main/java/com/bobbyesp/utilities/ConcurrentList.kt
diff --git a/app/utilities/src/main/java/com/bobbyesp/utilities/Logging.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/Logging.kt
index 8af7515..3a7c2c7 100644
--- a/app/utilities/src/main/java/com/bobbyesp/utilities/Logging.kt
+++ b/app/utilities/src/main/java/com/bobbyesp/utilities/Logging.kt
@@ -58,8 +58,9 @@ object Logging {
Build.VERSION.RELEASE
}
+ val appName = packageInfo.applicationInfo.name
return StringBuilder()
- .append("App version: Clippy $versionName ($versionCode)\n")
+ .append("App version: $appName $versionName ($versionCode)\n")
.append("Android version: Android $release (API ${Build.VERSION.SDK_INT})\n")
.append("Device: ${Build.MANUFACTURER} ${Build.MODEL}\n")
.append("Supported ABIs: ${Build.SUPPORTED_ABIS.contentToString()}\n")
diff --git a/app/utilities/src/main/java/com/bobbyesp/utilities/Resource.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/Resource.kt
deleted file mode 100644
index 2c32466..0000000
--- a/app/utilities/src/main/java/com/bobbyesp/utilities/Resource.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.bobbyesp.utilities
-
-sealed class Resource {
- data object Loading : Resource()
- data class Success(val data: T?) : Resource()
- data class Error(val message: String) : Resource()
-}
\ No newline at end of file
diff --git a/app/utilities/src/main/java/com/bobbyesp/utilities/Share.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/Share.kt
deleted file mode 100644
index b862191..0000000
--- a/app/utilities/src/main/java/com/bobbyesp/utilities/Share.kt
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.bobbyesp.utilities
-
-import android.content.Context
-import android.content.Intent
-import android.net.Uri
-import androidx.core.content.ContextCompat.startActivity
-
-object Share {
- fun shareText(context: Context, text: String) {
- val intent = Intent(Intent.ACTION_SEND).apply {
- type = "text/plain"
- putExtra(Intent.EXTRA_TEXT, text)
- }
- startActivity(context, intent, null)
- }
-
- fun shareImage(context: Context, uri: Uri) {
- val intent = Intent(Intent.ACTION_SEND).apply {
- type = "image/*"
- putExtra(Intent.EXTRA_STREAM, uri)
- }
- startActivity(context, intent, null)
- }
-
- fun shareImage(context: Context, uri: Uri, text: String) {
- val intent = Intent(Intent.ACTION_SEND).apply {
- type = "image/*"
- putExtra(Intent.EXTRA_STREAM, uri)
- putExtra(Intent.EXTRA_TEXT, text)
- }
- startActivity(context, intent, null)
- }
-
- fun shareHtml(context: Context, html: String) {
- val intent = Intent(Intent.ACTION_SEND).apply {
- type = "text/html"
- putExtra(Intent.EXTRA_TEXT, html)
- }
- startActivity(context, intent, null)
- }
-
- fun shareFile(context: Context, uri: Uri) {
- val intent = Intent(Intent.ACTION_SEND).apply {
- type = "application/*"
- putExtra(Intent.EXTRA_STREAM, uri)
- }
- startActivity(context, intent, null)
- }
-}
\ No newline at end of file
diff --git a/app/utilities/src/main/java/com/bobbyesp/ext/Array.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/ext/Array.kt
similarity index 78%
rename from app/utilities/src/main/java/com/bobbyesp/ext/Array.kt
rename to app/utilities/src/main/java/com/bobbyesp/utilities/ext/Array.kt
index b3012b6..a42a5b3 100644
--- a/app/utilities/src/main/java/com/bobbyesp/ext/Array.kt
+++ b/app/utilities/src/main/java/com/bobbyesp/utilities/ext/Array.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.ext
+package com.bobbyesp.utilities.ext
fun Array?.joinOrNullToString(separator: String = ", "): String? {
return this?.joinToString(separator = separator)
diff --git a/app/utilities/src/main/java/com/bobbyesp/ext/Int.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/ext/Int.kt
similarity index 91%
rename from app/utilities/src/main/java/com/bobbyesp/ext/Int.kt
rename to app/utilities/src/main/java/com/bobbyesp/utilities/ext/Int.kt
index 4eb1a4e..b026b51 100644
--- a/app/utilities/src/main/java/com/bobbyesp/ext/Int.kt
+++ b/app/utilities/src/main/java/com/bobbyesp/utilities/ext/Int.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.ext
+package com.bobbyesp.utilities.ext
fun Int.bigQuantityFormatter(): String {
return when (this) {
diff --git a/app/utilities/src/main/java/com/bobbyesp/ext/Long.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/ext/Long.kt
similarity index 92%
rename from app/utilities/src/main/java/com/bobbyesp/ext/Long.kt
rename to app/utilities/src/main/java/com/bobbyesp/utilities/ext/Long.kt
index dc74e49..963189d 100644
--- a/app/utilities/src/main/java/com/bobbyesp/ext/Long.kt
+++ b/app/utilities/src/main/java/com/bobbyesp/utilities/ext/Long.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.ext
+package com.bobbyesp.utilities.ext
import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource
diff --git a/app/utilities/src/main/java/com/bobbyesp/ext/PropertyMap.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/ext/PropertyMap.kt
similarity index 98%
rename from app/utilities/src/main/java/com/bobbyesp/ext/PropertyMap.kt
rename to app/utilities/src/main/java/com/bobbyesp/utilities/ext/PropertyMap.kt
index dd5278e..1527bb9 100644
--- a/app/utilities/src/main/java/com/bobbyesp/ext/PropertyMap.kt
+++ b/app/utilities/src/main/java/com/bobbyesp/utilities/ext/PropertyMap.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.ext
+package com.bobbyesp.utilities.ext
import com.bobbyesp.utilities.mediastore.AudioFileMetadata
diff --git a/app/utilities/src/main/java/com/bobbyesp/ext/String.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/ext/String.kt
similarity index 91%
rename from app/utilities/src/main/java/com/bobbyesp/ext/String.kt
rename to app/utilities/src/main/java/com/bobbyesp/utilities/ext/String.kt
index 5fd0331..f798e5b 100644
--- a/app/utilities/src/main/java/com/bobbyesp/ext/String.kt
+++ b/app/utilities/src/main/java/com/bobbyesp/utilities/ext/String.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.ext
+package com.bobbyesp.utilities.ext
import androidx.core.text.isDigitsOnly
diff --git a/app/utilities/src/main/java/com/bobbyesp/utilities/mediastore/AudioFileMetadata.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/mediastore/AudioFileMetadata.kt
index 3642009..e241c96 100644
--- a/app/utilities/src/main/java/com/bobbyesp/utilities/mediastore/AudioFileMetadata.kt
+++ b/app/utilities/src/main/java/com/bobbyesp/utilities/mediastore/AudioFileMetadata.kt
@@ -1,7 +1,7 @@
package com.bobbyesp.utilities.mediastore
-import com.bobbyesp.ext.PropertyMap
-import com.bobbyesp.ext.formatForField
+import com.bobbyesp.utilities.ext.PropertyMap
+import com.bobbyesp.utilities.ext.formatForField
import kotlinx.serialization.Serializable
@Serializable
diff --git a/app/utilities/src/main/java/com/bobbyesp/utilities/mediastore/MediaStoreReceiver.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/mediastore/MediaStoreReceiver.kt
index b9236a9..0e081d8 100644
--- a/app/utilities/src/main/java/com/bobbyesp/utilities/mediastore/MediaStoreReceiver.kt
+++ b/app/utilities/src/main/java/com/bobbyesp/utilities/mediastore/MediaStoreReceiver.kt
@@ -8,10 +8,10 @@ import android.net.Uri
import android.os.ParcelFileDescriptor
import android.provider.MediaStore
import android.util.Log
-import com.bobbyesp.model.Song
import com.bobbyesp.utilities.R
import com.bobbyesp.utilities.mediastore.advanced.advancedQuery
import com.bobbyesp.utilities.mediastore.advanced.observe
+import com.bobbyesp.utilities.model.Song
import kotlinx.coroutines.flow.map
import java.io.FileNotFoundException
diff --git a/app/utilities/src/main/java/com/bobbyesp/model/Song.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/model/Song.kt
similarity index 97%
rename from app/utilities/src/main/java/com/bobbyesp/model/Song.kt
rename to app/utilities/src/main/java/com/bobbyesp/utilities/model/Song.kt
index a7f81d4..a3a69ae 100644
--- a/app/utilities/src/main/java/com/bobbyesp/model/Song.kt
+++ b/app/utilities/src/main/java/com/bobbyesp/utilities/model/Song.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.model
+package com.bobbyesp.utilities.model
import android.net.Uri
import android.os.Parcelable
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/common/NavigationCustomArgs.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/navigation/CustomNavigationArguments.kt
similarity index 96%
rename from app/src/main/java/com/bobbyesp/metadator/presentation/common/NavigationCustomArgs.kt
rename to app/utilities/src/main/java/com/bobbyesp/utilities/navigation/CustomNavigationArguments.kt
index 137ea7d..cad84d8 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/common/NavigationCustomArgs.kt
+++ b/app/utilities/src/main/java/com/bobbyesp/utilities/navigation/CustomNavigationArguments.kt
@@ -1,4 +1,4 @@
-package com.bobbyesp.metadator.presentation.common
+package com.bobbyesp.utilities.navigation
import android.net.Uri
import android.os.Build
diff --git a/app/utilities/src/main/java/com/bobbyesp/utilities/navigation/Parcelable.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/navigation/Parcelable.kt
deleted file mode 100644
index 0ba1dc2..0000000
--- a/app/utilities/src/main/java/com/bobbyesp/utilities/navigation/Parcelable.kt
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.bobbyesp.utilities.navigation
-
-import android.os.Build
-import android.os.Parcelable
-import androidx.navigation.NavBackStackEntry
-
-inline fun NavBackStackEntry.getParcelable(key: String): T? {
- return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
- this.arguments?.getParcelable(
- key,
- T::class.java
- )
- } else {
- this.arguments?.getParcelable(key) as? T
- }
-}
diff --git a/app/src/main/java/com/bobbyesp/metadator/presentation/utils/pagination/PagingStateHandler.kt b/app/utilities/src/main/java/com/bobbyesp/utilities/ui/PagingStateHandler.kt
similarity index 94%
rename from app/src/main/java/com/bobbyesp/metadator/presentation/utils/pagination/PagingStateHandler.kt
rename to app/utilities/src/main/java/com/bobbyesp/utilities/ui/PagingStateHandler.kt
index ca60d70..e6e4309 100644
--- a/app/src/main/java/com/bobbyesp/metadator/presentation/utils/pagination/PagingStateHandler.kt
+++ b/app/utilities/src/main/java/com/bobbyesp/utilities/ui/PagingStateHandler.kt
@@ -1,11 +1,11 @@
-package com.bobbyesp.metadator.presentation.utils.pagination
+package com.bobbyesp.utilities.ui
import androidx.compose.foundation.lazy.LazyListScope
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.paging.LoadState
import androidx.paging.compose.LazyPagingItems
-import com.bobbyesp.metadator.BuildConfig
+import com.bobbyesp.utilities.BuildConfig
fun LazyListScope.pagingStateHandler(
items: LazyPagingItems?,
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index 95dec86..1342c1c 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -12,5 +12,5 @@ dependencies {
implementation("com.google.firebase:firebase-crashlytics-gradle:2.8.1")
}
-java.sourceCompatibility = JavaVersion.VERSION_17
-java.targetCompatibility = JavaVersion.VERSION_17
\ No newline at end of file
+java.sourceCompatibility = JavaVersion.VERSION_21
+java.targetCompatibility = JavaVersion.VERSION_21
\ No newline at end of file
diff --git a/crashhandler/build.gradle.kts b/crashhandler/build.gradle.kts
index f59039c..bac3149 100644
--- a/crashhandler/build.gradle.kts
+++ b/crashhandler/build.gradle.kts
@@ -25,8 +25,8 @@ android {
}
}
compileOptions {
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
+ sourceCompatibility = JavaVersion.VERSION_21
+ targetCompatibility = JavaVersion.VERSION_21
}
buildFeatures {
compose = true
@@ -36,7 +36,7 @@ android {
reportsDestination = layout.buildDirectory.dir("compose_compiler")
}
kotlinOptions {
- jvmTarget = "17"
+ jvmTarget = "21"
}
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index eb2573d..c1b2adc 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,18 +1,18 @@
[versions]
#General, lifecycle and core
-agp = "8.6.0-alpha04"
+agp = "8.7.0-alpha02"
firebaseCrashlyticsGradle = "3.0.2"
-gradle = "8.6.0-alpha04"
+gradle = "8.7.0-alpha02"
kotlin = "2.0.0"
appcompat = "1.7.0"
core-ktx = "1.13.1"
legacySupportV4 = "1.0.0"
-lifecycle-runtime-ktx = "2.8.2"
-activity-compose = "1.9.0"
-ksp = "2.0.0-1.0.21"
+lifecycle-runtime-ktx = "2.8.4"
+activity-compose = "1.9.1"
+ksp = "2.0.0-1.0.23"
lyricfier = "1.0"
splashscreen = "1.0.1"
-media3 = "1.4.0-alpha02"
+media3 = "1.4.0"
leakcanary = "2.13"
#Compose
@@ -25,17 +25,15 @@ accompanist = "0.34.0"
composeUiUtilities = "770003841d"
#More UI
-androidx-paging = "3.3.0"
+androidx-paging = "3.3.1"
qrcodeKotlinAndroid = "4.1.0"
-orbital = "0.3.3"
-shimmer = "1.0.3"
palette = "1.0.0"
#Navigation
-androidx-navigation = "2.8.0-beta03"
+androidx-navigation = "2.8.0-beta06"
#Coroutines
-kotlinx-coroutines = "1.8.0"
+kotlinx-coroutines = "1.8.1"
#Serialization and more related
kotlinx-datetime = "0.5.0"
@@ -47,26 +45,23 @@ coil = "2.6.0"
landscapistCoil = "2.2.13"
#Network
-ktor = "2.3.7" #For me the best client
+ktor = "2.3.11" #For me the best client
#Dependency injection
-hilt = "2.51"
+hilt = "2.51.1"
hilt-ext = "1.2.0"
#Database
room = "2.6.1"
#High performance Key-value storage
-mmkv = "1.3.2"
-
-#Markdown handler
-markdown = "0.3.7"
+mmkv = "1.3.6"
#Firebase, GMS...
firebaseAuth = "23.0.0"
gmsPlayServicesAuth = "21.2.0"
googleServices = "4.4.2"
-firebaseBom = "33.1.1"
+firebaseBom = "33.1.2"
#Spotify API
spotify-apiHandler = "4.1.3"
@@ -76,8 +71,8 @@ taglib = "1.0.0-alpha17"
#Tests
junit = "4.13.2"
-androidx-test-ext-junit = "1.1.5"
-espresso-core = "3.5.1"
+androidx-test-ext-junit = "1.2.1"
+espresso-core = "3.6.1"
#Others
uiautomator = "2.3.0"
@@ -85,8 +80,8 @@ benchmark-macro-junit4 = "1.2.4"
androidx-baselineprofile = "1.2.4"
profileinstaller = "1.3.1"
materialVersion = "1.12.0"
-media3DatasourceOkhttp = "1.3.1"
-scrollbar = "1.9.0"
+media3DatasourceOkhttp = "1.4.0"
+scrollbar = "2.2.0"
[libraries]
#Core libraries
@@ -186,9 +181,6 @@ kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime",
#Key-value storage
mmkv = { group = "com.tencent", name = "mmkv", version.ref = "mmkv" }
-#Markdown parser
-markdown = { group = "com.github.jeziellago", name = "compose-markdown", version.ref = "markdown" }
-
#Firebase and GMS
firebase-auth = { group = "com.google.firebase", name = "firebase-auth-ktx", version.ref = "firebaseAuth" }
gms-playservices-auth = { group = "com.google.android.gms", name = "play-services-auth", version.ref = "gmsPlayServicesAuth" }
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 7525fb5..2faffdf 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Tue Mar 26 14:31:21 CET 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists