Skip to content

Commit

Permalink
+ version up: 0.9.8.1 (175)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anrimian committed Sep 21, 2024
1 parent 345b5f0 commit 94638a2
Show file tree
Hide file tree
Showing 204 changed files with 4,855 additions and 2,929 deletions.
11 changes: 6 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ android {

vectorDrawables.useSupportLibrary = true
resConfigs 'en', 'be', 'cs', 'de', 'el', 'es', 'fr', 'in', 'pt', 'ru', 'tr', 'uk'

}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
minifyEnabled false
consumerProguardFiles 'proguard-rules.pro'
}
QA {
initWith release
Expand All @@ -33,7 +32,9 @@ android {
minifyEnabled false
}
}

lintOptions {
abortOnError false
}
buildFeatures {
viewBinding true
}
Expand All @@ -51,7 +52,7 @@ android {
'**/kotlin/**',
'**/*.txt',
'**/*.xml',
'**/*.properties'
'/*.properties'
]
}
}
Expand Down
10 changes: 5 additions & 5 deletions app/lite/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ android {
targetSdkVersion config.androidTargetSdkVersion

applicationId 'com.github.anrimian.musicplayer'
versionCode 167
versionName "0.9.8"
versionCode 175
versionName "0.9.8.1"
testInstrumentationRunner config.testInstrumentationRunner
testApplicationId "${applicationId}.test"
archivesBaseName = "$applicationId-v$versionName($versionCode)"
archivesBaseName = "$applicationId-v$versionName-b$versionCode"
vectorDrawables.useSupportLibrary = true
}

buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard-rules-lite.pro'
}
QA {
initWith release
Expand Down Expand Up @@ -68,7 +68,7 @@ android {
'**/kotlin/**',
'**/*.txt',
'**/*.xml',
'**/*.properties'
'/*.properties'
]
}
}
Expand Down
4 changes: 4 additions & 0 deletions app/lite/proguard-rules-lite.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-keepclassmembers class com.github.anrimian.musicplayer.lite.di.LiteComponents {
public void init(android.content.Context);
public getLiteAppComponent();
}
6 changes: 3 additions & 3 deletions app/lite/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 162,
"versionName": "0.9.7.1",
"outputFile": "com.github.anrimian.musicplayer-v0.9.7.1(162)-release.apk"
"versionCode": 167,
"versionName": "0.9.8",
"outputFile": "com.github.anrimian.musicplayer-v0.9.8(167)-release.apk"
}
],
"elementType": "File"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.github.anrimian.musicplayer.lite;
package com.github.anrimian.musicplayer.lite

import com.github.anrimian.musicplayer.App;
import com.github.anrimian.musicplayer.lite.di.LiteComponents;
import android.content.Context
import com.github.anrimian.musicplayer.App
import com.github.anrimian.musicplayer.lite.di.LiteComponents

public class LiteApp extends App {
class LiteApp : App() {

@Override
protected void initComponents() {
LiteComponents.init(getApplicationContext());
override fun initComponents(appContext: Context) {
LiteComponents.init(appContext)
}

}
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
package com.github.anrimian.musicplayer.lite.di;
package com.github.anrimian.musicplayer.lite.di

import android.content.Context;
import android.content.Context
import com.github.anrimian.musicplayer.di.Components
import com.github.anrimian.musicplayer.di.app.AppModule
import com.github.anrimian.musicplayer.lite.di.app.DaggerLiteAppComponent
import com.github.anrimian.musicplayer.lite.di.app.LiteAppComponent

import com.github.anrimian.musicplayer.di.Components;
import com.github.anrimian.musicplayer.di.app.AppModule;
import com.github.anrimian.musicplayer.lite.di.app.DaggerLiteAppComponent;
import com.github.anrimian.musicplayer.lite.di.app.LiteAppComponent;
object LiteComponents {

public class LiteComponents {
private lateinit var liteAppComponent: LiteAppComponent

private static LiteComponents instance;

private final LiteAppComponent liteAppComponent;

public static void init(Context appContext) {
instance = new LiteComponents(appContext);
}

private static LiteComponents getInstance() {
if (instance == null) {
throw new IllegalStateException("components must be initialized first");
}
return instance;
fun init(appContext: Context) {
liteAppComponent = DaggerLiteAppComponent.builder()
.appModule(AppModule(appContext))
.build()
Components.init(liteAppComponent)
}

private LiteComponents(Context appContext) {
liteAppComponent = DaggerLiteAppComponent.builder()
.appModule(new AppModule(appContext))
.build();
Components.init(liteAppComponent);
fun getLiteAppComponent(): LiteAppComponent {
return liteAppComponent
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,26 @@ import com.github.anrimian.musicplayer.data.controllers.music.players.utils.ExoP
import com.github.anrimian.musicplayer.data.controllers.music.players.utils.MediaPlayerDataSourceBuilder
import com.github.anrimian.musicplayer.data.storage.providers.music.StorageMusicProvider
import com.github.anrimian.musicplayer.data.storage.source.ContentSourceHelper
import com.github.anrimian.musicplayer.domain.controllers.SystemMusicController
import com.github.anrimian.musicplayer.domain.interactors.analytics.Analytics
import com.github.anrimian.musicplayer.domain.interactors.player.LibraryPlayerInteractor
import com.github.anrimian.musicplayer.domain.interactors.player.PlayerErrorParser
import com.github.anrimian.musicplayer.domain.interactors.player.PlayerScreenInteractor
import com.github.anrimian.musicplayer.domain.interactors.sleep_timer.SleepTimerInteractor
import com.github.anrimian.musicplayer.domain.models.sync.FileKey
import com.github.anrimian.musicplayer.domain.repositories.MediaScannerRepository
import com.github.anrimian.musicplayer.domain.repositories.PlayQueueRepository
import com.github.anrimian.musicplayer.domain.repositories.SettingsRepository
import com.github.anrimian.musicplayer.domain.repositories.UiStateRepository
import com.github.anrimian.musicplayer.lite.ui.AboutTextBinderImpl
import com.github.anrimian.musicplayer.lite.ui.ActionStateBinderImpl
import com.github.anrimian.musicplayer.lite.ui.SpecialNavigationImpl
import com.github.anrimian.musicplayer.ui.about.AboutTextBinder
import com.github.anrimian.musicplayer.ui.common.error.parser.DefaultErrorParser
import com.github.anrimian.musicplayer.ui.common.error.parser.ErrorParser
import com.github.anrimian.musicplayer.ui.common.format.MessageTextFormatter
import com.github.anrimian.musicplayer.ui.common.navigation.SpecialNavigation
import com.github.anrimian.musicplayer.ui.player_screen.view.ActionStateBinder
import dagger.Module
import dagger.Provides
import javax.inject.Singleton
Expand All @@ -39,14 +50,14 @@ class LiteAppModule {
@Provides
@Singleton
fun contentSourceUriBuilder(
storageMusicProvider: StorageMusicProvider
storageMusicProvider: StorageMusicProvider,
) = ContentSourceHelper(storageMusicProvider)

@Provides
@Singleton
fun mediaPlayerDataSourceBuilder(
context: Context,
storageMusicProvider: StorageMusicProvider
storageMusicProvider: StorageMusicProvider,
) = MediaPlayerDataSourceBuilder(
context,
storageMusicProvider
Expand All @@ -67,4 +78,31 @@ class LiteAppModule {
@Provides
fun aboutTextBinder(): AboutTextBinder = AboutTextBinderImpl()

@Provides
fun actionStateBinder(): ActionStateBinder = ActionStateBinderImpl()

@Provides
fun playerScreenInteractor(
sleepTimerInteractor: SleepTimerInteractor,
libraryPlayerInteractor: LibraryPlayerInteractor,
syncInteractor: SyncInteractor<FileKey, *, Long>,
playQueueRepository: PlayQueueRepository,
uiStateRepository: UiStateRepository,
settingsRepository: SettingsRepository,
mediaScannerRepository: MediaScannerRepository,
systemMusicController: SystemMusicController,
) = PlayerScreenInteractor(
sleepTimerInteractor,
libraryPlayerInteractor,
syncInteractor,
playQueueRepository,
uiStateRepository,
settingsRepository,
mediaScannerRepository,
systemMusicController
)

@Provides
fun messageTextFormatter() = MessageTextFormatter()

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.github.anrimian.musicplayer.lite.ui

import com.github.anrimian.musicplayer.domain.interactors.player.ActionState
import com.github.anrimian.musicplayer.ui.common.toolbar.AdvancedToolbar
import com.github.anrimian.musicplayer.ui.player_screen.view.ActionStateBinder

class ActionStateBinderImpl: ActionStateBinder {

override fun bind(toolbar: AdvancedToolbar, actionState: ActionState) {
toolbar.setNavigationButtonHintIcon(-1)
}

}
8 changes: 4 additions & 4 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@
#don't remember why
-dontwarn java.lang.invoke**

#RxJava2
#RxJava3
-dontwarn io.reactivex**

#slidr
-dontwarn com.r0adkll.slidr.R$id

#chips layout manager
#https://github.com/BelooS/ChipsLayoutManager/issues/31
-keep class com.beloo.widget.chipslayoutmanager.Orientation { *; }

#kotlin
-dontwarn kotlin.**
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
public static void checkNotNull(...);
public static void checkExpressionValueIsNotNull(...);
public static void checkNotNullExpressionValue(...);
public static void checkReturnedValueIsNotNull(...);
public static void checkFieldIsNotNull(...);
public static void checkParameterIsNotNull(...);
public static void checkNotNullParameter(...);
}



Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public boolean showOverflowMenu() {
}

public interface OverflowMenuRunnable {
void call(View anchorView, ArrayList<MenuItemImpl> items);
void call(View anchorView, @SuppressLint("RestrictedApi") ArrayList<MenuItemImpl> items);
}
}
18 changes: 13 additions & 5 deletions app/src/main/java/com/github/anrimian/musicplayer/App.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.anrimian.musicplayer;

import android.app.Application;
import android.content.Context;

import androidx.appcompat.app.AppCompatDelegate;

Expand All @@ -18,14 +19,21 @@

public abstract class App extends Application {

@Override
public void onCreate() {
super.onCreate();
public App() {
super();
RxJavaPlugins.setErrorHandler(new RxJavaErrorConsumer());
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}

initComponents();
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
initComponents(base);
}

@Override
public void onCreate() {
super.onCreate();
DevTools.run(this);

AppComponent appComponent = Components.getAppComponent();
Expand All @@ -39,6 +47,6 @@ public void onCreate() {
}
}

protected abstract void initComponents();
protected abstract void initComponents(Context appContext);

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ interface Arguments {
String TITLE_ARG = "title_arg";
String POSITIVE_BUTTON_ARG = "positive_button_arg";
String NEGATIVE_BUTTON_ARG = "negative_button_arg";
String NEUTRAL_BUTTON_ARG = "neutral_button_arg";
String EDIT_TEXT_HINT = "edit_text_hint";
String EDIT_TEXT_VALUE = "edit_text_value";
String CAN_BE_EMPTY_ARG = "can_be_empty_arg";
Expand All @@ -43,6 +44,9 @@ interface Arguments {
String DIGITS_ARG = "digits_arg";
String CLOSE_MULTISELECT_ARG = "close_multiselect_arg";
String PLAYLIST_IMPORT_ARG = "playlist_import_arg";
String DESCRIPTION_ARG = "description_arg";
String MESSAGE_ARG = "message_arg";
String MESSAGE_RES_ARG = "message_res_arg";
}

interface Tags {
Expand All @@ -62,9 +66,7 @@ interface Tags {
String ADD_GENRE_TAG = "add_genre_tag";
String EDIT_GENRE_TAG = "edit_genre_tag";
String NEW_FOLDER_NAME_TAG = "new_folder_name_tag";
String MESSAGE_ARG = "message_arg";
String MESSAGE_RES_ARG = "message_res_arg";
String PROGRESS_DIALOG_TAG = "progress_dialog_arg";
String PROGRESS_DIALOG_TAG = "progress_dialog_tag";
String EDIT_COVER_TAG = "edit_cover_tag";
String ENABLED_MEDIA_PLAYERS = "enabled_media_players";
String SPEED_SELECTOR_TAG = "speed_selector_tag";
Expand Down
Loading

0 comments on commit 94638a2

Please sign in to comment.