Skip to content

Commit 1028730

Browse files
authored
Merge pull request #1273 from maxrave-dev/dev
v0.2.21: New version
2 parents e044962 + 97b4e15 commit 1028730

File tree

702 files changed

+23240
-25057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

702 files changed

+23240
-25057
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ crowdin.yml
2323

2424
# Sentry Config File
2525
sentry.properties
26+
/.claude/

MediaServiceCore

Submodule MediaServiceCore updated 69 files

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ sometimes, some songs or videos get the wrong lyrics
103103
We're looking for more contributors, all contributions are welcome!
104104
See our [CODE OF CONDUCT](https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/CODE_OF_CONDUCT.md)
105105

106+
## Showcase
107+
This project is following clean architecture and MVVM pattern (in UI, app module).
108+
109+
### Dependencies graph
110+
<p float="left">
111+
<img src="https://github.com/maxrave-dev/SimpMusic/blob/dev/asset/dependencies_graph.svg?raw=true" width="800">
112+
</p>
113+
106114
## Support & Donations
107115
#### Special thanks to all supporter ❤️
108116
<div align="left">

app/build.gradle.kts

Lines changed: 16 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
import com.android.build.gradle.internal.tasks.CompileArtProfileTask
23
import java.util.Properties
34

@@ -6,20 +7,16 @@ plugins {
67
alias(libs.plugins.android.application)
78
alias(libs.plugins.kotlin.android)
89
alias(libs.plugins.compose.compiler)
9-
alias(libs.plugins.navigation.safeargs)
10-
alias(libs.plugins.ksp)
1110
alias(libs.plugins.aboutlibraries)
12-
alias(libs.plugins.room)
1311
alias(libs.plugins.kotlin.serialization)
14-
alias(libs.plugins.kotlin.parcelize)
1512
alias(libs.plugins.sentry.gradle)
1613
}
1714

1815
kotlin {
1916
jvmToolchain(17) // or appropriate version
2017
compilerOptions {
2118
freeCompilerArgs.add("-Xwhen-guards")
22-
freeCompilerArgs.add("-Xcontext-receivers")
19+
freeCompilerArgs.add("-Xcontext-parameters")
2320
freeCompilerArgs.add("-Xmulti-dollar-interpolation")
2421
}
2522
}
@@ -30,10 +27,6 @@ android {
3027
namespace = "com.maxrave.simpmusic"
3128
compileSdk = 36
3229

33-
room {
34-
schemaDirectory("$projectDir/schemas")
35-
}
36-
3730
defaultConfig {
3831
applicationId = "com.maxrave.simpmusic"
3932
minSdk = 26
@@ -127,6 +120,7 @@ android {
127120
isShrinkResources = true
128121
proguardFiles(
129122
getDefaultProguardFile("proguard-android-optimize.txt"),
123+
"consumer-rules.pro",
130124
"proguard-rules.pro",
131125
)
132126
splits {
@@ -208,17 +202,20 @@ dependencies {
208202
androidTestImplementation(composeBom)
209203
implementation(libs.compose.material3.lib)
210204
implementation(libs.compose.material3.sizeclass)
205+
implementation(libs.compose.material3.adaptive)
211206
implementation(libs.compose.ui)
212207
implementation(libs.compose.material.ripple)
213208
implementation(libs.compose.material.icons.core)
214209
implementation(libs.compose.material.icons.extended)
215210
implementation(libs.compose.ui.viewbinding)
216211
implementation(libs.constraintlayout.compose)
217212

218-
// Android Studio Preview support
213+
implementation(libs.glance)
214+
implementation(libs.glance.appwidget)
215+
implementation(libs.glance.material3)
216+
219217
implementation(libs.ui.tooling.preview)
220218
implementation(libs.activity.compose)
221-
// Optional - Integration with ViewModels
222219
implementation(libs.lifecycle.viewmodel.compose)
223220

224221
implementation(libs.lifecycle.runtime.ktx)
@@ -228,55 +225,28 @@ dependencies {
228225
implementation(libs.work.runtime.ktx)
229226
androidTestImplementation(libs.work.testing)
230227

231-
// Material Design 3
232-
implementation(libs.material)
233228
// Runtime
234229
implementation(libs.startup.runtime)
230+
implementation(project(":common"))
235231
// Other module
236-
implementation(project(mapOf("path" to ":kotlinYtmusicScraper")))
237-
implementation(project(mapOf("path" to ":spotify")))
238-
implementation(project(mapOf("path" to ":aiService")))
239-
implementation(project(mapOf("path" to ":sharedutils")))
240-
implementation(project(mapOf("path" to ":lyricsService")))
232+
implementation(project(":domain"))
233+
implementation(project(":data"))
234+
implementation(project(":media3-ui"))
241235

242236
implementation(libs.lifecycle.livedata.ktx)
243237
implementation(libs.lifecycle.viewmodel.ktx)
244238
debugImplementation(libs.ui.tooling)
245239

246240
// ExoPlayer
247-
implementation(libs.media3.exoplayer)
248-
implementation(libs.media3.ui)
249-
implementation(libs.media3.compose)
250-
implementation(libs.media3.session)
251-
implementation(libs.media3.exoplayer.dash)
252-
implementation(libs.media3.exoplayer.hls)
253-
implementation(libs.media3.exoplayer.rtsp)
254-
implementation(libs.media3.exoplayer.smoothstreaming)
255-
implementation(libs.media3.exoplayer.workmanager)
256-
implementation(libs.media3.datasource.okhttp)
257-
implementation(libs.okhttp3.logging.interceptor)
258-
259-
// Palette Color
260-
implementation(libs.palette.ktx)
261-
// Expandable Text View
262-
implementation(libs.expandable.text)
263-
264-
implementation(libs.constraintlayout)
241+
265242
testImplementation(libs.junit)
266243
androidTestImplementation(libs.androidx.junit)
267244
androidTestImplementation(libs.espresso.core)
268245

269-
implementation(libs.room.runtime)
270-
implementation(libs.room.ktx)
271-
ksp(libs.room.compiler)
272246
// Legacy Support
273247
implementation(libs.legacy.support.v4)
274248
// Coroutines
275249
implementation(libs.coroutines.android)
276-
implementation(libs.coroutines.guava)
277-
// Navigation
278-
implementation(libs.navigation.fragment.ktx)
279-
implementation(libs.navigation.ui.ktx)
280250

281251
// Navigation Compose
282252
implementation(libs.navigation.compose)
@@ -290,22 +260,12 @@ dependencies {
290260
implementation(libs.kmpalette.core)
291261
// Easy Permissions
292262
implementation(libs.easypermissions)
293-
// Palette Color
294-
implementation(libs.palette.ktx)
295263

296264
// Preference
297265
implementation(libs.preference.ktx)
298266

299-
// Fragment KTX
300-
implementation(libs.fragment.ktx)
301-
ksp(libs.kotlinx.metadata.jvm)
302267
// DataStore
303268
implementation(libs.datastore.preferences)
304-
// Swipe To Refresh
305-
implementation(libs.swiperefreshlayout)
306-
// Insetter
307-
implementation(libs.insetter)
308-
implementation(libs.insetter.dbx)
309269

310270
// Lottie
311271
implementation(libs.lottie)
@@ -321,21 +281,14 @@ dependencies {
321281
implementation(libs.aboutlibraries)
322282
implementation(libs.aboutlibraries.compose.m3)
323283

324-
implementation(libs.flexbox)
325284
implementation(libs.balloon)
326285

327-
// InsetsX
328-
implementation(libs.insetsx)
329-
330286
// Koin
331287
implementation(platform(libs.koin.bom))
332288
implementation(libs.koin.core)
333289
implementation(libs.koin.android)
334290
implementation(libs.koin.androidx.compose)
335291

336-
// Store5
337-
implementation(libs.store)
338-
339292
// Jetbrains Markdown
340293
api(libs.markdown)
341294

@@ -345,20 +298,18 @@ dependencies {
345298

346299
fullImplementation(libs.sentry.android)
347300

301+
implementation(libs.liquid.glass)
302+
348303
// debugImplementation(libs.leak.canary)
349304
}
350305
/**
351306
* Task to generate the aboutlibraries.json file
352-
* Run with:
353-
./gradlew :app:exportLibraryDefinitions --no-daemon --no-configuration-cache --no-build-cache
354307
**/
355308
aboutLibraries {
356-
android.registerAndroidTasks = false
309+
collect.configPath = file("../config")
357310
export {
358-
exportVariant = "fullRelease"
359311
prettyPrint = true
360312
excludeFields = listOf("generated")
361-
outputPath = File(project.projectDir, "src/main/res/raw/aboutlibraries.json")
362313
}
363314
}
364315
tasks.withType<CompileArtProfileTask> {

app/proguard-rules.pro

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,10 @@
144144
-dontwarn org.openjsse.**
145145
-dontwarn okhttp3.internal.Util
146146

147-
-keep class com.liskovsoft.youtubeapi.** { *; }
148-
-keep interface com.liskovsoft.youtubeapi.** { *; }
149-
-keep class com.liskovsoft.googleapi.** { *; }
150-
-keep interface com.liskovsoft.googleapi.** { *; }
147+
-keep class com.liskovsoft.** { *; }
148+
-keep interface com.liskovsoft.** { *; }
151149
-keep class com.eclipsesource.v8.** { *; }
150+
-keep class com.maxrave.kotlinytmusicscraper.** { *; }
152151

153152
-dontwarn javax.script.AbstractScriptEngine
154153
-dontwarn javax.script.Bindings
@@ -179,6 +178,13 @@
179178
-dontwarn jdk.dynalink.linker.support.Guards
180179
-dontwarn jdk.dynalink.support.ChainedCallSite
181180

181+
-keep class org.apache.commons.io.** { *; }
182+
183+
#YtDlp
184+
-keep class com.yausername.** { *; }
185+
-keep class org.apache.commons.compress.archivers.zip.** { *; }
186+
-keepattributes SourceFile
187+
182188
## Rules for NewPipeExtractor
183189
-keep class org.schabi.newpipe.extractor.timeago.patterns.** { *; }
184190
-keep class org.mozilla.javascript.** { *; }
@@ -190,4 +196,18 @@
190196
-dontwarn java.beans.BeanInfo
191197
-dontwarn java.beans.IntrospectionException
192198
-dontwarn java.beans.Introspector
193-
-dontwarn java.beans.PropertyDescriptor
199+
-dontwarn java.beans.PropertyDescriptor
200+
201+
-dontwarn com.maxrave.data.di.loader.LoaderKt
202+
-dontwarn com.maxrave.media3.ui.MediaPlayerViewKt
203+
204+
-keep class com.maxrave.data.di.loader.LoaderKt { *; }
205+
-keep class com.maxrave.data.mapping.MappingKt { *; }
206+
-keep class com.maxrave.data.extension.** { *; }
207+
-keep class com.maxrave.data.di.** { *; }
208+
209+
-keep class com.maxrave.kotlinytmusicscraper.** { *; }
210+
211+
-keep class org.simpmusic.lyrics.parser.** { *; }
212+
-keep class org.simpmusic.lyrics.models.** { *; }
213+
-keep class com.simpmusic.lyrics.parser.** { *; }

app/src/main/AndroidManifest.xml

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
1212
<uses-permission android:name="android.permission.WAKE_LOCK" />
1313
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
14+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
1415

1516
<uses-feature
1617
android:name="android.hardware.type.automotive"
@@ -52,23 +53,22 @@
5253
android:theme="@style/Theme.Material3.Light.NoActionBar"
5354
android:enableOnBackInvokedCallback="true"
5455
android:extractNativeLibs="true"
56+
android:requestLegacyExternalStorage="true"
5557
tools:targetApi="tiramisu">
56-
<receiver
57-
android:name=".ui.widget.BasicWidget"
58-
android:exported="false">
58+
59+
<receiver android:name=".ui.widget.AppWidgetReceiver"
60+
android:exported="true">
5961
<intent-filter>
6062
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
6163
</intent-filter>
62-
6364
<meta-data
6465
android:name="android.appwidget.provider"
6566
android:resource="@xml/new_app_widget_info" />
6667
</receiver>
6768

6869
<activity
6970
android:name=".ui.MainActivity"
70-
android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
71-
android:screenOrientation="portrait"
71+
android:configChanges="keyboardHidden|screenSize|screenLayout|smallestScreenSize"
7272
android:exported="true"
7373
android:supportsPictureInPicture="true"
7474
android:enableOnBackInvokedCallback="true"
@@ -150,14 +150,6 @@
150150
android:resource="@xml/shortcuts" />
151151
</activity>
152152

153-
<receiver
154-
android:name="androidx.media3.session.MediaButtonReceiver"
155-
android:exported="true">
156-
<intent-filter>
157-
<action android:name="android.intent.action.MEDIA_BUTTON" />
158-
</intent-filter>
159-
</receiver>
160-
161153
<provider
162154
android:name="androidx.startup.InitializationProvider"
163155
android:authorities="${applicationId}.androidx-startup"
@@ -181,29 +173,6 @@
181173
<meta-data
182174
android:name="androidx.car.app.TintableAttributionIcon"
183175
android:resource="@drawable/monochrome" />
184-
185-
<service
186-
android:name=".service.SimpleMediaService"
187-
android:exported="true"
188-
android:foregroundServiceType="mediaPlayback"
189-
android:stopWithTask="false">
190-
<intent-filter>
191-
<action android:name="androidx.media3.session.MediaSessionService" />
192-
<action android:name="androidx.media3.session.MediaLibraryService" />
193-
<action android:name="android.media.browse.MediaBrowserService" />
194-
<action android:name="android.intent.action.MEDIA_BUTTON" />
195-
</intent-filter>
196-
</service>
197-
<service
198-
android:name=".service.test.download.MusicDownloadService"
199-
android:exported="true"
200-
android:foregroundServiceType="dataSync">
201-
<intent-filter>
202-
<action android:name="androidx.media3.exoplayer.downloadService.action.RESTART" />
203-
204-
<category android:name="android.intent.category.DEFAULT" />
205-
</intent-filter>
206-
</service>
207176
<service
208177
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
209178
android:enabled="false"

0 commit comments

Comments
 (0)