Skip to content

Commit 79c2cef

Browse files
authored
Merge pull request #1061 from maxrave-dev/dev
v0.2.18: New version
2 parents bc178c8 + 495b261 commit 79c2cef

File tree

212 files changed

+12986
-9310
lines changed

Some content is hidden

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

212 files changed

+12986
-9310
lines changed

.github/workflows/android-release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ jobs:
3535
distribution: "temurin"
3636
cache: 'gradle'
3737

38-
- name: Update Sentry DSN
38+
- name: Update Sentry Secrets
3939
env:
4040
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
41-
run: echo 'SENTRY_DSN=${{ secrets.SENTRY_DSN }}' > ./local.properties
41+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
42+
run: |
43+
echo 'SENTRY_DSN=${{ secrets.SENTRY_DSN }}' > ./local.properties
44+
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> ./local.properties
4245
4346
- name: Update environment variables
4447
env:

.github/workflows/android.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ jobs:
3636
distribution: "temurin"
3737
cache: 'gradle'
3838

39-
- name: Update Sentry DSN
39+
- name: Update Sentry Secrets
4040
env:
4141
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
42-
run: echo 'SENTRY_DSN=${{ secrets.SENTRY_DSN }}' > ./local.properties
42+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
43+
run: |
44+
echo 'SENTRY_DSN=${{ secrets.SENTRY_DSN }}' > ./local.properties
45+
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> ./local.properties
4346
4447
- name: Build release APK
4548
run: ./gradlew app:assembleFullRelease

MediaServiceCore

Submodule MediaServiceCore updated 33 files

README.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
<div align="center"> <img src="https://raw.githubusercontent.com/maxrave-dev/SimpMusic/jetpack_compose/fastlane/metadata/android/en-US/images/featureGraphic.png"> <h1>SimpMusic</h1>
2-
A FOSS YouTube Music client for Android with many features from<br>Spotify, Musixmatch, SponsorBlock, ReturnYouTubeDislike<br> <br> <a href="https://github.com/maxrave-dev/SimpMusic/releases"><img src="https://img.shields.io/github/v/release/maxrave-dev/SimpMusic"></a> <a href="https://github.com/maxrave-dev/SimpMusic/releases"><img src="https://img.shields.io/github/downloads/maxrave-dev/SimpMusic/total"></a> <br> <br> <a href="https://trendshift.io/repositories/13482" target="_blank"><img src="https://trendshift.io/api/badge/repositories/13482" alt="maxrave-dev%2FSimpMusic | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> <br> <h4>Download</h4>
3-
<a href="https://apt.izzysoft.de/packages/com.maxrave.simpmusic/"><img src="https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png" height="80"></a> <a href="https://f-droid.org/en/packages/com.maxrave.simpmusic/"><img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" height="80"></a> <a href="https://www.openapk.net/simpmusic/com.maxrave.simpmusic/"><img src="https://www.openapk.net/images/openapk-badge.png" height="80"></a> <a href="https://www.androidfreeware.net/download-simpmusic-apk.html"><img src="https://www.androidfreeware.net/images/androidfreeware-badge.png" height="80"></a> <a href="https://github.com/maxrave-dev/SimpMusic/releases"><img src="https://raw.githubusercontent.com/NeoApplications/Neo-Backup/034b226cea5c1b30eb4f6a6f313e4dadcbb0ece4/badge_github.png" height="80"></a> <a href="https://www.producthunt.com/posts/simpmusic?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-simpmusic" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=797736&theme=light&t=1737299913224" alt="SimpMusic - A&#0032;FOSS&#0032;YouTube&#0032;Music&#0032;client&#0032;for&#0032;Android&#0032;with&#0032;many&#0032;features | Product Hunt" style="width: 250px; height: 80px;" width="250" height="80" /></a> <h4>Nightly Build</h4>
4-
<a href="https://nightly.link/maxrave-dev/SimpMusic/workflows/android/dev/app.zip"><img src="https://github.com/maxrave-dev/SimpMusic/actions/workflows/android.yml/badge.svg"></a><br/> <a href="https://nightly.link/maxrave-dev/SimpMusic/workflows/android/dev/app.zip"><img src="https://raw.githubusercontent.com/NeoApplications/Neo-Backup/034b226cea5c1b30eb4f6a6f313e4dadcbb0ece4/badge_github.png" height="80"></a> </div>
2+
A FOSS YouTube Music client for Android with many features from<br>Spotify, Musixmatch, SponsorBlock, ReturnYouTubeDislike
3+
<br>
4+
<br>
5+
<a href="https://github.com/maxrave-dev/SimpMusic/releases"><img src="https://img.shields.io/github/v/release/maxrave-dev/SimpMusic"></a> <a href="https://github.com/maxrave-dev/SimpMusic/releases"><img src="https://img.shields.io/github/downloads/maxrave-dev/SimpMusic/total"></a> <br> <br> <a href="https://trendshift.io/repositories/13482" target="_blank"><img src="https://trendshift.io/api/badge/repositories/13482" alt="maxrave-dev%2FSimpMusic | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
6+
<br>
7+
<br>
8+
<a href="https://www.producthunt.com/products/simpmusic/reviews?utm_source=badge-product_rating&utm_medium=badge&utm_source=badge-simpmusic" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/product_rating.svg?product_id=903836&theme=dark" alt="SimpMusic - A&#0032;FOSS&#0032;YouTube&#0032;Music&#0032;client&#0032;for&#0032;Android&#0032;with&#0032;many&#0032;features | Product Hunt" style="width: 242px; height: 108px;" width="242" height="108" /></a>
9+
<br>
10+
<h4>Download</h4>
11+
<a href="https://apt.izzysoft.de/packages/com.maxrave.simpmusic/"><img src="https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png" width="200"></a>
12+
<a href="https://f-droid.org/en/packages/com.maxrave.simpmusic/"><img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" width="200"></a>
13+
<a href="https://www.openapk.net/simpmusic/com.maxrave.simpmusic/"><img src="https://www.openapk.net/images/openapk-badge.png" width="200"></a>
14+
<a href="https://github.com/maxrave-dev/SimpMusic/releases"><img src="https://raw.githubusercontent.com/NeoApplications/Neo-Backup/034b226cea5c1b30eb4f6a6f313e4dadcbb0ece4/badge_github.png" width="200"></a>
15+
<h4>Nightly Build</h4>
16+
<a href="https://nightly.link/maxrave-dev/SimpMusic/workflows/android/dev/app.zip"><img src="https://github.com/maxrave-dev/SimpMusic/actions/workflows/android.yml/badge.svg"></a><br/> <a href="https://nightly.link/maxrave-dev/SimpMusic/workflows/android/dev/app.zip"><img src="https://raw.githubusercontent.com/NeoApplications/Neo-Backup/034b226cea5c1b30eb4f6a6f313e4dadcbb0ece4/badge_github.png" width="200"></a>
17+
</div>
518

619
## Features ✨️
720
- Play music from YouTube Music or YouTube for free, without ads and in the background
@@ -81,9 +94,13 @@ sometimes, some songs or videos get the wrong lyrics
8194

8295
#### More FAQ, join [my Discord channel](https://discord.com/channels/1136988323819298856/1349800418745778196)
8396
## Developer/Team
84-
### [maxrave-dev](https://github.com/maxrave-dev/SimpMusic): Founder/Developer/Designer
85-
### [Owen Connor](https://github.com/owencz1998): Discord Server Admin.
86-
### [Ilian Delagrange](https://github.com/ilianoKokoro): Discord Server Admin.
97+
- [maxrave-dev](https://github.com/maxrave-dev/SimpMusic): Founder/Developer/Designer
98+
- [Owen Connor](https://github.com/owencz1998): Discord Server Admin.
99+
- [Ilian Delagrange](https://github.com/ilianoKokoro): Discord Server Admin.
100+
101+
We're looking for more contributors, all contributions are welcome!
102+
See our [CODE OF CONDUCT](https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/CODE_OF_CONDUCT.md)
103+
87104
## Support & Donations
88105
#### Special thanks to all supporter ❤️
89106
<div align="left">
@@ -100,14 +117,19 @@ src="https://raw.githubusercontent.com/liberapay/liberapay.com/master/www/assets
100117
</p>
101118

102119
## SimpMusic is sponsored by:
120+
<a href="https://www.digitalocean.com/?refcode=d7f6eedfb9a9&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge"><img src="https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%201.svg" width="300" alt="DigitalOcean Referral Badge" /></a>
121+
<br>
103122
<a href="https://crowdin.com">
104123
<img src="https://support.crowdin.com/assets/logos/plate/png/crowdin-logo-with-plate.png" width="300"/>
105124
</a>
125+
<br>
106126
<a href="https://sentry.io">
107127
<img src="https://github.com/maxrave-dev/SimpMusic/blob/dev/asset/sentry.svg?raw=true" width="300"/>
108128
</a>
109129
<br>
110130

111-
Crowdin and Sentry, both have free enterprise plan for Open-source project. Follow the URLs:
131+
Get free $200 credit over 60 days on DigitalOcean: [GET NOW](https://www.digitalocean.com/?refcode=d7f6eedfb9a9&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge)
132+
133+
Crowdin and Sentry both have a free enterprise plan for Open-source projects. Follow the URLs:
112134
- [Open Source License Request Form | Crowdin](https://crowdin.com/page/open-source-project-setup-request)
113-
- [Sentry for Open Source | Sentry](https://sentry.io/for/open-source/)
135+
- [Sentry for Open Source | Sentry](https://sentry.io/for/open-source/)

aiService/build.gradle.kts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import com.android.build.gradle.internal.tasks.CompileArtProfileTask
33
plugins {
44
alias(libs.plugins.android.library)
55
alias(libs.plugins.kotlin.android)
6-
kotlin("plugin.serialization")
6+
alias(libs.plugins.kotlin.serialization)
7+
}
8+
9+
kotlin {
10+
jvmToolchain(17)
711
}
812

913
android {
@@ -27,11 +31,8 @@ android {
2731
}
2832
}
2933
compileOptions {
30-
sourceCompatibility = JavaVersion.VERSION_11
31-
targetCompatibility = JavaVersion.VERSION_11
32-
}
33-
kotlinOptions {
34-
jvmTarget = "11"
34+
sourceCompatibility = JavaVersion.VERSION_17
35+
targetCompatibility = JavaVersion.VERSION_17
3536
}
3637
}
3738

app/build.gradle.kts

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ plugins {
1010
alias(libs.plugins.ksp)
1111
alias(libs.plugins.aboutlibraries)
1212
alias(libs.plugins.room)
13+
alias(libs.plugins.kotlin.serialization)
14+
alias(libs.plugins.sentry.gradle)
1315
}
1416

1517
kotlin {
1618
jvmToolchain(17) // or appropriate version
1719
compilerOptions {
1820
freeCompilerArgs.add("-Xwhen-guards")
21+
freeCompilerArgs.add("-Xcontext-receivers")
1922
}
2023
}
2124

@@ -131,13 +134,6 @@ android {
131134
sourceCompatibility = JavaVersion.VERSION_17
132135
targetCompatibility = JavaVersion.VERSION_17
133136
}
134-
kotlin {
135-
jvmToolchain(17)
136-
}
137-
kotlinOptions {
138-
freeCompilerArgs = freeCompilerArgs + "-Xcontext-receivers"
139-
jvmTarget = "17"
140-
}
141137
// enable view binding
142138
buildFeatures {
143139
viewBinding = true
@@ -163,8 +159,31 @@ android {
163159
}
164160
}
165161

162+
sentry {
163+
org.set("simpmusic")
164+
projectName.set("android")
165+
ignoredFlavors.set(setOf("foss"))
166+
ignoredBuildTypes.set(setOf("debug"))
167+
autoInstallation.enabled = false
168+
val token =
169+
try {
170+
println("Full build detected, enabling Sentry Auth Token")
171+
val properties = Properties()
172+
properties.load(rootProject.file("local.properties").inputStream())
173+
properties.getProperty("SENTRY_AUTH_TOKEN")
174+
} catch (e: Exception) {
175+
println("Failed to load SENTRY_AUTH_TOKEN from local.properties: ${e.message}")
176+
null
177+
}
178+
authToken.set(token ?: "")
179+
includeProguardMapping.set(true)
180+
autoUploadProguardMapping.set(true)
181+
telemetry.set(false)
182+
}
183+
166184
dependencies {
167185
val fullImplementation = "fullImplementation"
186+
val debugImplementation = "debugImplementation"
168187

169188
implementation(project(":lyricsProviders"))
170189
// Compose
@@ -202,6 +221,7 @@ dependencies {
202221
implementation(project(mapOf("path" to ":spotify")))
203222
implementation(project(mapOf("path" to ":aiService")))
204223
implementation(project(mapOf("path" to ":sharedutils")))
224+
implementation(project(mapOf("path" to ":lyricsService")))
205225

206226
implementation(libs.lifecycle.livedata.ktx)
207227
implementation(libs.lifecycle.viewmodel.ktx)
@@ -210,6 +230,7 @@ dependencies {
210230
// ExoPlayer
211231
implementation(libs.media3.exoplayer)
212232
implementation(libs.media3.ui)
233+
implementation(libs.media3.compose)
213234
implementation(libs.media3.session)
214235
implementation(libs.media3.exoplayer.dash)
215236
implementation(libs.media3.exoplayer.hls)
@@ -241,7 +262,11 @@ dependencies {
241262
implementation(libs.navigation.fragment.ktx)
242263
implementation(libs.navigation.ui.ktx)
243264

244-
implementation(libs.gson)
265+
// Navigation Compose
266+
implementation(libs.navigation.compose)
267+
268+
// Kotlin Serialization
269+
implementation(libs.kotlinx.serialization.json)
245270

246271
// Coil
247272
implementation(libs.coil.compose)
@@ -266,9 +291,6 @@ dependencies {
266291
implementation(libs.insetter)
267292
implementation(libs.insetter.dbx)
268293

269-
// Shimmer
270-
implementation(libs.shimmer)
271-
272294
// Lottie
273295
implementation(libs.lottie)
274296
implementation(libs.lottie.compose)
@@ -298,7 +320,6 @@ dependencies {
298320
implementation(platform(libs.koin.bom))
299321
implementation(libs.koin.core)
300322
implementation(libs.koin.android)
301-
implementation(libs.koin.workmanager)
302323
implementation(libs.koin.androidx.compose)
303324

304325
// Store5
@@ -312,11 +333,17 @@ dependencies {
312333
implementation(libs.haze.material)
313334

314335
fullImplementation(libs.sentry.android)
336+
337+
// debugImplementation(libs.leak.canary)
315338
}
316339
aboutLibraries {
317-
prettyPrint = true
318-
registerAndroidTasks = false
319-
excludeFields = arrayOf("generated")
340+
export {
341+
prettyPrint = true
342+
excludeFields = listOf("generated")
343+
}
344+
android {
345+
registerAndroidTasks = false
346+
}
320347
}
321348
tasks.withType<CompileArtProfileTask> {
322349
enabled = false

app/proguard-rules.pro

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,59 @@
2121
#-renamesourcefileattribute SourceFile
2222
-keep class kotlinx.coroutines.CoroutineExceptionHandler
2323
-keep class kotlinx.coroutines.internal.MainDispatcherFactory
24+
# Keep `Companion` object fields of serializable classes.
25+
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
26+
-if @kotlinx.serialization.Serializable class **
27+
-keepclassmembers class <1> {
28+
static <1>$Companion Companion;
29+
}
30+
31+
# Keep `serializer()` on companion objects (both default and named) of serializable classes.
32+
-if @kotlinx.serialization.Serializable class ** {
33+
static **$* *;
34+
}
35+
-keepclassmembers class <2>$<3> {
36+
kotlinx.serialization.KSerializer serializer(...);
37+
}
38+
39+
# Keep `INSTANCE.serializer()` of serializable objects.
40+
-if @kotlinx.serialization.Serializable class ** {
41+
public static ** INSTANCE;
42+
}
43+
-keepclassmembers class <1> {
44+
public static <1> INSTANCE;
45+
kotlinx.serialization.KSerializer serializer(...);
46+
}
47+
48+
# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
49+
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
50+
51+
# Don't print notes about potential mistakes or omissions in the configuration for kotlinx-serialization classes
52+
# See also https://github.com/Kotlin/kotlinx.serialization/issues/1900
53+
-dontnote kotlinx.serialization.**
54+
55+
# Serialization core uses `java.lang.ClassValue` for caching inside these specified classes.
56+
# If there is no `java.lang.ClassValue` (for example, in Android), then R8/ProGuard will print a warning.
57+
# However, since in this case they will not be used, we can disable these warnings
58+
2459
-dontwarn org.slf4j.impl.StaticLoggerBinder
2560
-dontwarn kotlinx.serialization.internal.ClassValueReferences
26-
-keep class com.google.gson.reflect.TypeToken { *; }
27-
-keep class * extends com.google.gson.reflect.TypeToken
2861
-keep class com.maxrave.simpmusic.data.model.** { *; }
2962
-keep class com.maxrave.simpmusic.extension.AllExtKt { *; }
3063
-keep class com.maxrave.simpmusic.extension.AllExtKt$* { *; }
3164
-keep class com.maxrave.kotlinytmusicscraper.extension.MapExtKt$* { *; }
3265

33-
# Removes all Logs as they cause perfomance issues in prod
34-
-assumenosideeffects class android.util.Log {
35-
public static int w(...);
36-
public static int e(...);
37-
public static int i(...);
38-
public static int d(...);
39-
public static int v(...);
40-
}
66+
## Removes all Logs as they cause perfomance issues in prod
67+
#-assumenosideeffects class android.util.Log {
68+
# public static int w(...);
69+
# public static int e(...);
70+
# public static int i(...);
71+
# public static int d(...);
72+
# public static int v(...);
73+
#}
4174
## Rules for NewPipeExtractor
4275
-keep class org.schabi.newpipe.extractor.timeago.patterns.** { *; }
4376
-keep class org.mozilla.javascript.** { *; }
44-
-keep class org.mozilla.classfile.ClassFileWriter
4577
-dontwarn org.mozilla.javascript.tools.**
4678
# Please add these rules to your existing keep rules in order to suppress warning
4779
# This is generated automatically by the Android Gradle plugin.
@@ -110,6 +142,7 @@
110142
-dontwarn org.conscrypt.**
111143
-dontwarn org.bouncycastle.**
112144
-dontwarn org.openjsse.**
145+
-dontwarn okhttp3.internal.Util
113146

114147
-keep class com.liskovsoft.youtubeapi.** { *; }
115148
-keep interface com.liskovsoft.youtubeapi.** { *; }

app/src/main/java/com/maxrave/simpmusic/SimpMusicApplication.kt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import android.app.Application
44
import android.util.Log
55
import androidx.appcompat.app.AppCompatDelegate
66
import androidx.media3.common.util.UnstableApi
7+
import androidx.work.Configuration
8+
import androidx.work.WorkManager
79
import cat.ereza.customactivityoncrash.config.CaocConfig
810
import coil3.ImageLoader
911
import coil3.PlatformContext
@@ -21,7 +23,6 @@ import com.maxrave.simpmusic.ui.theme.newDiskCache
2123
import okhttp3.OkHttpClient
2224
import org.koin.android.ext.koin.androidContext
2325
import org.koin.android.ext.koin.androidLogger
24-
import org.koin.androidx.workmanager.koin.workManagerFactory
2526
import org.koin.core.component.KoinComponent
2627
import org.koin.core.context.startKoin
2728
import org.koin.core.logger.Level
@@ -62,8 +63,17 @@ class SimpMusicApplication :
6263
mediaServiceModule,
6364
viewModelModule,
6465
)
65-
workManagerFactory()
6666
}
67+
// provide custom configuration
68+
val workConfig =
69+
Configuration
70+
.Builder()
71+
.setMinimumLoggingLevel(Log.INFO)
72+
.build()
73+
74+
// initialize WorkManager
75+
WorkManager.initialize(this, workConfig)
76+
6777
CaocConfig.Builder
6878
.create()
6979
.backgroundMode(CaocConfig.BACKGROUND_MODE_SILENT) // default: CaocConfig.BACKGROUND_MODE_SHOW_CUSTOM

app/src/main/java/com/maxrave/simpmusic/common/Config.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("ktlint:standard:class-naming")
2+
13
package com.maxrave.simpmusic.common
24

35
import android.content.Context
@@ -26,6 +28,8 @@ object Config {
2628
const val DOWNLOAD_CACHE = "downloadCache"
2729
const val CANVAS_CACHE = "canvasCache"
2830
const val SERVICE_SCOPE = "serviceScope"
31+
const val MAIN_PLAYER = "mainPlayer"
32+
const val SECONDARY_PLAYER = "secondaryPlayer"
2933

3034
val REMOVED_SONG_DATE_TIME: LocalDateTime = LocalDateTime.of(2003, Month.AUGUST, 26, 3, 0)
3135

@@ -198,7 +202,7 @@ object SUPPORTED_LANGUAGE {
198202
"한국어",
199203
"Català",
200204
"فارسی",
201-
"български"
205+
"български",
202206
)
203207
val codes: Array<String> =
204208
arrayOf(

0 commit comments

Comments
 (0)