Skip to content

Commit

Permalink
+ version up: 0.9.7 (159)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anrimian committed Jun 4, 2023
1 parent 7c39dd9 commit 90d9eac
Show file tree
Hide file tree
Showing 258 changed files with 4,634 additions and 4,180 deletions.
6 changes: 1 addition & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apply plugin: 'kotlin-kapt'
apply plugin: "de.mannodermaus.android-junit5"

android {
namespace 'com.github.anrimian.musicplayer'

def config = rootProject.ext

Expand Down Expand Up @@ -31,7 +32,6 @@ android {
debug {
minifyEnabled false
}

}

buildFeatures {
Expand All @@ -41,9 +41,6 @@ android {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
packagingOptions {
jniLibs {
excludes += ['**/kotlin/**']
Expand Down Expand Up @@ -75,7 +72,6 @@ dependencies {
implementation deps.appCompatResources
implementation deps.material
implementation deps.recyclerView
implementation deps.recyclerViewFastScroll
implementation deps.constraintLayout
implementation deps.supportMedia

Expand Down
9 changes: 4 additions & 5 deletions app/lite/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ android {
}
}

namespace 'com.github.anrimian.musicplayer.lite'

def config = rootProject.ext

compileSdk config.androidCompileSdkVersion
Expand All @@ -24,8 +26,8 @@ android {
targetSdkVersion config.androidTargetSdkVersion

applicationId 'com.github.anrimian.musicplayer'
versionCode 143
versionName "0.9.6.1"
versionCode 159
versionName "0.9.7"
testInstrumentationRunner config.testInstrumentationRunner
testApplicationId "${applicationId}.test"
archivesBaseName = "$applicationId-v$versionName($versionCode)"
Expand Down Expand Up @@ -56,9 +58,6 @@ android {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
packagingOptions {
jniLibs {
excludes += ['**/kotlin/**']
Expand Down
3 changes: 1 addition & 2 deletions app/lite/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.github.anrimian.musicplayer.lite">
xmlns:tools="http://schemas.android.com/tools">

<!--remove permission from glide because we don't use internet for covers-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" tools:node="remove"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.github.anrimian.musicplayer.data.storage.providers.music.StorageMusic
import com.github.anrimian.musicplayer.data.storage.source.ContentSourceHelper
import com.github.anrimian.musicplayer.domain.interactors.analytics.Analytics
import com.github.anrimian.musicplayer.domain.interactors.player.PlayerErrorParser
import com.github.anrimian.musicplayer.domain.models.sync.FileKey
import com.github.anrimian.musicplayer.lite.ui.AboutTextBinderImpl
import com.github.anrimian.musicplayer.lite.ui.SpecialNavigationImpl
import com.github.anrimian.musicplayer.ui.about.AboutTextBinder
Expand All @@ -29,7 +30,7 @@ class LiteAppModule {

@Provides
@Singleton
fun syncInteractor(): SyncInteractor<*, *, Long> = StubSyncInteractor<Any, Any, Long>()
fun syncInteractor(): SyncInteractor<FileKey, *, Long> = StubSyncInteractor<FileKey, Any, Long>()

@Provides
@Singleton
Expand Down
18 changes: 15 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.github.anrimian.musicplayer">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
Expand Down Expand Up @@ -55,6 +54,14 @@
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="content"/>
<data android:scheme="file"/>
<data android:mimeType="audio/mpegurl"/>
<data android:mimeType="audio/x-mpegurl"/>
</intent-filter>
</activity>

<activity android:name=".ui.main.external_player.ExternalPlayerActivity"
Expand All @@ -67,7 +74,12 @@
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="content"/>
<data android:scheme="file"/>
<data android:mimeType="audio/*"/>
<data android:mimeType="audio/mpeg"/>
<data android:mimeType="audio/mp4"/>
<data android:mimeType="audio/flac"/>
<data android:mimeType="audio/ogg"/>
<data android:mimeType="audio/x-wav"/>
<data android:mimeType="audio/midi"/>
</intent-filter>
</activity>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

public interface Constants {

String PLAYLIST_MIME_TYPE = "audio/x-mpegurl";

interface Actions {
int PLAY = 1;
int PAUSE = 2;
Expand Down Expand Up @@ -39,6 +41,10 @@ interface Arguments {
String IDS_ARG = "ids_arg";
String NAME_ARG = "name_arg";
String LAUNCH_PREPARE_ARG = "launch_prepare_arg";
String INPUT_TYPE_ARG = "input_type_arg";
String DIGITS_ARG = "digits_arg";
String CLOSE_MULTISELECT_ARG = "close_multiselect_arg";
String PLAYLIST_IMPORT_ARG = "playlist_import_arg";
}

interface Tags {
Expand All @@ -53,6 +59,9 @@ interface Tags {
String ALBUM_TAG = "album_tag";
String ALBUM_ARTIST_TAG = "album_artist_tag";
String LYRICS = "lyrics_tag";
String TRACK_NUMBER_TAG = "track_number_tag";
String DISC_NUMBER_TAG = "disc_number_tag";
String COMMENT_TAG = "comment_tag";
String ADD_GENRE_TAG = "add_genre_tag";
String EDIT_GENRE_TAG = "edit_genre_tag";
String NEW_FOLDER_NAME_TAG = "new_folder_name_tag";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@
import com.github.anrimian.musicplayer.di.app.library.genres.GenresModule;
import com.github.anrimian.musicplayer.di.app.library.genres.items.GenreItemsComponent;
import com.github.anrimian.musicplayer.di.app.library.genres.items.GenreItemsModule;
import com.github.anrimian.musicplayer.di.app.order.OrderComponent;
import com.github.anrimian.musicplayer.di.app.order.OrderModule;
import com.github.anrimian.musicplayer.di.app.play_list.PlayListComponent;
import com.github.anrimian.musicplayer.di.app.play_list.PlayListModule;
import com.github.anrimian.musicplayer.di.app.settings.SettingsComponent;
import com.github.anrimian.musicplayer.di.app.share.ShareComponent;
import com.github.anrimian.musicplayer.di.app.share.ShareModule;
import com.github.anrimian.musicplayer.domain.models.order.Order;

import javax.annotation.Nullable;

Expand Down Expand Up @@ -140,6 +143,10 @@ public static ShareComponent getShareComponent(long[] ids) {
return getAppComponent().shareComponent(new ShareModule(ids));
}

public static OrderComponent getOrderComponent(Order order) {
return getAppComponent().orderComponent(new OrderModule(order));
}

private LibraryComponent buildLibraryComponent() {
if (libraryComponent == null) {
libraryComponent = getAppComponent().libraryComponent(new LibraryModule());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import com.github.anrimian.musicplayer.di.app.external_player.ExternalPlayerModule;
import com.github.anrimian.musicplayer.di.app.library.LibraryComponent;
import com.github.anrimian.musicplayer.di.app.library.LibraryModule;
import com.github.anrimian.musicplayer.di.app.order.OrderComponent;
import com.github.anrimian.musicplayer.di.app.order.OrderModule;
import com.github.anrimian.musicplayer.di.app.play_list.PlayListComponent;
import com.github.anrimian.musicplayer.di.app.play_list.PlayListModule;
import com.github.anrimian.musicplayer.di.app.settings.SettingsComponent;
Expand All @@ -29,8 +31,10 @@
import com.github.anrimian.musicplayer.domain.interactors.player.PlayerInteractor;
import com.github.anrimian.musicplayer.domain.interactors.settings.DisplaySettingsInteractor;
import com.github.anrimian.musicplayer.domain.interactors.settings.LibrarySettingsInteractor;
import com.github.anrimian.musicplayer.domain.models.sync.FileKey;
import com.github.anrimian.musicplayer.domain.repositories.LoggerRepository;
import com.github.anrimian.musicplayer.domain.repositories.MediaScannerRepository;
import com.github.anrimian.musicplayer.domain.repositories.SettingsRepository;
import com.github.anrimian.musicplayer.domain.repositories.StorageSourceRepository;
import com.github.anrimian.musicplayer.domain.repositories.UiStateRepository;
import com.github.anrimian.musicplayer.infrastructure.MediaSessionHandler;
Expand Down Expand Up @@ -80,14 +84,15 @@ public interface AppComponent {
ArtistEditorComponent artistEditorComponent(ArtistEditorModule module);
ExternalPlayerComponent externalPlayerComponent(ExternalPlayerModule module);
ShareComponent shareComponent(ShareModule module);
OrderComponent orderComponent(OrderModule orderModule);

LibraryPlayerInteractor libraryPlayerInteractor();
DisplaySettingsInteractor displaySettingsInteractor();
PlayerInteractor playerInteractor();
MusicServiceInteractor musicServiceInteractor();
LibrarySettingsInteractor librarySettingsInteractor();
CompositionSourceInteractor sourceInteractor();
SyncInteractor<?, ?, Long> syncInteractor();
SyncInteractor<FileKey, ?, Long> syncInteractor();

PlayListsPresenter playListsPresenter();
CreatePlayListPresenter createPlayListsPresenter();
Expand All @@ -97,6 +102,7 @@ public interface AppComponent {
WidgetMenuPresenter widgetMenuPresenter();

UiStateRepository uiStateRepository();
SettingsRepository settingsRepository();
MediaScannerRepository mediaScannerRepository();
StorageSourceRepository storageSourceRepository();
LoggerRepository loggerRepository();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import com.github.anrimian.musicplayer.ui.common.locale.LocaleControllerImpl;
import com.github.anrimian.musicplayer.ui.common.theme.ThemeController;
import com.github.anrimian.musicplayer.ui.notifications.MediaNotificationsDisplayer;
import com.github.anrimian.musicplayer.ui.notifications.MediaNotificationsDisplayerApi33;
import com.github.anrimian.musicplayer.ui.notifications.MediaNotificationsDisplayerImpl;
import com.github.anrimian.musicplayer.ui.notifications.NotificationDisplayerApi33;
import com.github.anrimian.musicplayer.ui.notifications.NotificationsDisplayer;
import com.github.anrimian.musicplayer.ui.notifications.NotificationsDisplayerImpl;
Expand Down Expand Up @@ -65,9 +67,12 @@ Context appContext() {
@Nonnull
@Singleton
MediaNotificationsDisplayer mediaNotificationsDisplayer(Context context,
AppNotificationBuilder notificationBuilder,
CoverImageLoader coverImageLoader) {
return new MediaNotificationsDisplayer(context, notificationBuilder, coverImageLoader);
AppNotificationBuilder notificationBuilder,
CoverImageLoader coverImageLoader) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
return new MediaNotificationsDisplayerApi33(context, notificationBuilder);
}
return new MediaNotificationsDisplayerImpl(context, notificationBuilder, coverImageLoader);
}

@Provides
Expand All @@ -90,8 +95,8 @@ AppNotificationBuilder appNotificationBuilder() {
@Provides
@Nonnull
@Singleton
SystemServiceController systemServiceController(Context context) {
return new SystemServiceControllerImpl(context);
SystemServiceController systemServiceController(Context context, SettingsRepository settingsRepository) {
return new SystemServiceControllerImpl(context, settingsRepository);
}

@Provides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import com.github.anrimian.musicplayer.domain.interactors.player.PlayerErrorParser;
import com.github.anrimian.musicplayer.domain.interactors.player.PlayerInteractor;
import com.github.anrimian.musicplayer.domain.interactors.playlists.PlayListsInteractor;
import com.github.anrimian.musicplayer.domain.models.sync.FileKey;
import com.github.anrimian.musicplayer.domain.repositories.EditorRepository;
import com.github.anrimian.musicplayer.domain.repositories.EqualizerRepository;
import com.github.anrimian.musicplayer.domain.repositories.LibraryRepository;
Expand Down Expand Up @@ -98,7 +99,7 @@ PlayerInteractor playerInteractor(MusicPlayerController musicPlayerController,
@NonNull
@Singleton
CompositionSourceInteractor compositionSourceInteractor(StorageSourceRepository storageSourceRepository,
SyncInteractor<?, ?, Long> syncInteractor) {
SyncInteractor<FileKey, ?, Long> syncInteractor) {
return new CompositionSourceInteractor(storageSourceRepository, syncInteractor);
}

Expand All @@ -122,7 +123,7 @@ ExternalPlayerInteractor externalPlayerInteractor(PlayerCoordinatorInteractor in
@NonNull
@Singleton
LibraryPlayerInteractor libraryPlayerInteractor(PlayerCoordinatorInteractor playerCoordinatorInteractor,
SyncInteractor<?, ?, Long> syncInteractor,
SyncInteractor<FileKey, ?, Long> syncInteractor,
SettingsRepository settingsRepository,
PlayQueueRepository playQueueRepository,
LibraryRepository musicProviderRepository,
Expand Down Expand Up @@ -314,7 +315,7 @@ LibraryFoldersInteractor libraryFilesInteractor(LibraryRepository musicProviderR
EditorRepository editorRepository,
LibraryPlayerInteractor musicPlayerInteractor,
PlayListsInteractor playListsInteractor,
SyncInteractor<?, ?, Long> syncInteractor,
SyncInteractor<FileKey, ?, Long> syncInteractor,
SettingsRepository settingsRepository,
UiStateRepository uiStateRepository,
MediaScannerRepository mediaScannerRepository) {
Expand All @@ -331,23 +332,27 @@ LibraryFoldersInteractor libraryFilesInteractor(LibraryRepository musicProviderR
@Provides
@Nonnull
LibraryArtistsInteractor libraryArtistsInteractor(LibraryRepository repository,
EditorRepository editorRepository,
LibraryPlayerInteractor libraryPlayerInteractor,
PlayListsInteractor playListsInteractor,
SettingsRepository settingsRepository,
UiStateRepository uiStateRepository) {
return new LibraryArtistsInteractor(repository,
editorRepository,
libraryPlayerInteractor,
playListsInteractor,
settingsRepository,
uiStateRepository);
}

@Provides
@Nonnull
LibraryAlbumsInteractor libraryAlbumsInteractor(LibraryRepository repository,
EditorRepository editorRepository,
LibraryPlayerInteractor libraryPlayerInteractor,
PlayListsInteractor playListsInteractor,
SettingsRepository settingsRepository,
UiStateRepository uiStateRepository) {
return new LibraryAlbumsInteractor(repository,
editorRepository,
libraryPlayerInteractor,
playListsInteractor,
settingsRepository,
uiStateRepository);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

import android.content.Context;

import com.github.anrimian.musicplayer.data.database.dao.compositions.CompositionsDaoWrapper;
import com.github.anrimian.musicplayer.data.database.dao.play_list.PlayListsDaoWrapper;
import com.github.anrimian.musicplayer.data.repositories.playlists.PlayListsRepositoryImpl;
import com.github.anrimian.musicplayer.data.repositories.scanner.storage.playlists.PlaylistFilesStorage;
import com.github.anrimian.musicplayer.data.storage.providers.playlists.StoragePlayListsProvider;
import com.github.anrimian.musicplayer.domain.interactors.analytics.Analytics;
import com.github.anrimian.musicplayer.domain.interactors.playlists.PlayListsInteractor;
Expand Down Expand Up @@ -65,14 +67,20 @@ PlayListsInteractor playListsInteractor(PlayListsRepository playListsRepository,
@Provides
@Nonnull
@Singleton
PlayListsRepository storagePlayListDataSource(SettingsRepository settingsRepository,
PlayListsRepository storagePlayListDataSource(Context context,
SettingsRepository settingsRepository,
StoragePlayListsProvider playListsProvider,
CompositionsDaoWrapper compositionsDaoWrapper,
PlayListsDaoWrapper playListsDaoWrapper,
PlaylistFilesStorage playlistFilesStorage,
@Named(DB_SCHEDULER) Scheduler dbScheduler,
@Named(SLOW_BG_SCHEDULER) Scheduler slowBgScheduler) {
return new PlayListsRepositoryImpl(settingsRepository,
return new PlayListsRepositoryImpl(context,
settingsRepository,
playListsProvider,
compositionsDaoWrapper,
playListsDaoWrapper,
playlistFilesStorage,
dbScheduler,
slowBgScheduler);
}
Expand Down
Loading

0 comments on commit 90d9eac

Please sign in to comment.