Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: BobbyESP/Spowlo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.0
Choose a base ref
...
head repository: BobbyESP/Spowlo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 12,748 additions and 3,181 deletions.
  1. +2 −0 .gitignore
  2. +0 −1 .idea/.name
  3. +26 −0 .idea/appInsightsSettings.xml
  4. +10 −1 .idea/compiler.xml
  5. +10 −0 .idea/deploymentTargetDropDown.xml
  6. +3 −3 .idea/gradle.xml
  7. +1 −1 .idea/kotlinc.xml
  8. +10 −0 .idea/migrations.xml
  9. +2 −1 .idea/misc.xml
  10. +1 −1 .idea/vcs.xml
  11. +6 −3 README.md
  12. +75 −35 app/build.gradle.kts
  13. +48 −1 app/proguard-rules.pro
  14. +3 −3 app/schemas/com.bobbyesp.spowlo.database.AppDatabase/1.json
  15. +2 −4 app/src/androidTest/java/com/bobbyesp/spowlo/ExampleInstrumentedTest.kt
  16. +17 −4 app/src/main/AndroidManifest.xml
  17. +79 −33 app/src/main/java/com/bobbyesp/spowlo/App.kt
  18. +239 −0 app/src/main/java/com/bobbyesp/spowlo/CrashHandlerActivity.kt
  19. +317 −64 app/src/main/java/com/bobbyesp/spowlo/Downloader.kt
  20. +49 −0 app/src/main/java/com/bobbyesp/spowlo/DownloaderKeepUpService.kt
  21. +0 −29 app/src/main/java/com/bobbyesp/spowlo/DownloadsQueue.kt
  22. +25 −49 app/src/main/java/com/bobbyesp/spowlo/MainActivity.kt
  23. +67 −0 app/src/main/java/com/bobbyesp/spowlo/NotificationActionReceiver.kt
  24. +3 −3 app/src/main/java/com/bobbyesp/spowlo/database/AppDatabase.kt
  25. +3 −5 app/src/main/java/com/bobbyesp/spowlo/database/DownloadedSongInfo.kt
  26. +6 −6 app/src/main/java/com/bobbyesp/spowlo/database/SongsInfoDao.kt
  27. +19 −0 app/src/main/java/com/bobbyesp/spowlo/di/NetworkModules.kt
  28. +7 −3 app/src/main/java/com/bobbyesp/spowlo/features/mod_downloader/README.md
  29. +33 −87 app/src/main/java/com/bobbyesp/spowlo/features/mod_downloader/data/remote/ModsDownloaderAPI.kt
  30. +44 −0 app/src/main/java/com/bobbyesp/spowlo/features/mod_downloader/data/remote/ModsDownloaderAPIImpl.kt
  31. +3 −3 ...ain/java/com/bobbyesp/spowlo/features/mod_downloader/domain/model/{refactor → }/APIResponseDto.kt
  32. +0 −10 app/src/main/java/com/bobbyesp/spowlo/features/mod_downloader/domain/model/PackagesObjectDto.kt
  33. +0 −29 app/src/main/java/com/bobbyesp/spowlo/features/mod_downloader/domain/model/PackagesResponseDto.kt
  34. +22 −12 app/src/main/java/com/bobbyesp/spowlo/features/mod_downloader/ui/components/ArchTagComponent.kt
  35. +20 −10 app/src/main/java/com/bobbyesp/spowlo/features/mod_downloader/ui/components/PackageItem.kt
  36. +25 −11 .../main/java/com/bobbyesp/spowlo/features/mod_downloader/ui/components/PackagesListCardComponent.kt
  37. +0 −12 app/src/main/java/com/bobbyesp/spowlo/features/mod_downloader/util/ModDownloaderUtils.kt
  38. +340 −0 app/src/main/java/com/bobbyesp/spowlo/features/spotify_api/data/paging/SpotifyAppPagingSources.kt
  39. +232 −0 app/src/main/java/com/bobbyesp/spowlo/features/spotify_api/data/remote/SpotifyApiRequests.kt
  40. +8 −0 app/src/main/java/com/bobbyesp/spowlo/features/spotify_api/model/SpotifyData.kt
  41. +3 −6 app/src/main/java/com/bobbyesp/spowlo/ui/common/AnimatedComposable.kt
  42. +4 −26 app/src/main/java/com/bobbyesp/spowlo/ui/common/AsyncImageImpl.kt
  43. +5 −1 app/src/main/java/com/bobbyesp/spowlo/ui/common/CompositionLocals.kt
  44. +6 −1 app/src/main/java/com/bobbyesp/spowlo/ui/common/Ext.kt
  45. +15 −7 app/src/main/java/com/bobbyesp/spowlo/ui/common/Route.kt
  46. +34 −3 app/src/main/java/com/bobbyesp/spowlo/ui/components/BottomDrawer.kt
  47. +3 −2 app/src/main/java/com/bobbyesp/spowlo/ui/components/Buttons.kt
  48. +5 −4 app/src/main/java/com/bobbyesp/spowlo/ui/components/ConsoleOutputComponent.kt
  49. +10 −2 app/src/main/java/com/bobbyesp/spowlo/ui/components/DialogItems.kt
  50. +0 −4 app/src/main/java/com/bobbyesp/spowlo/ui/components/Dialogs.kt
  51. +4 −1 app/src/main/java/com/bobbyesp/spowlo/ui/components/Divider.kt
  52. +12 −7 app/src/main/java/com/bobbyesp/spowlo/ui/components/PreferenceItems.kt
  53. +4 −2 app/src/main/java/com/bobbyesp/spowlo/ui/components/SettingItem.kt
  54. +47 −0 app/src/main/java/com/bobbyesp/spowlo/ui/components/ShimmerEffect.kt
  55. +72 −108 app/src/main/java/com/bobbyesp/spowlo/ui/components/TextField.kt
  56. +2 −2 app/src/main/java/com/bobbyesp/spowlo/ui/components/TopAppBar.kt
  57. +66 −0 app/src/main/java/com/bobbyesp/spowlo/ui/components/WarningCard.kt
  58. +18 −8 app/src/main/java/com/bobbyesp/spowlo/ui/components/about/ContributorComponent.kt
  59. +4 −5 app/src/main/java/com/bobbyesp/spowlo/ui/components/about/HeadDeveloperComponent.kt
  60. +98 −0 app/src/main/java/com/bobbyesp/spowlo/ui/components/cards/ExpandableElevatedCard.kt
  61. +267 −0 app/src/main/java/com/bobbyesp/spowlo/ui/components/download_tasks/DownloadingTaskItem.kt
  62. +33 −43 app/src/main/java/com/bobbyesp/spowlo/ui/components/history/HistoryMediaComponents.kt
  63. +62 −0 ...src/main/java/com/bobbyesp/spowlo/ui/components/others/shimmer/cards/HorizontalSongCardShimmer.kt
  64. +252 −0 app/src/main/java/com/bobbyesp/spowlo/ui/components/settings/SettingsComponents.kt
  65. +23 −14 app/src/main/java/com/bobbyesp/spowlo/ui/components/songs/FeatureIcons.kt
  66. +1 −4 app/src/main/java/com/bobbyesp/spowlo/ui/components/songs/MiniMetadataInfoComponent.kt
  67. +16 −13 app/src/main/java/com/bobbyesp/spowlo/ui/components/songs/SongCard.kt
  68. +25 −11 app/src/main/java/com/bobbyesp/spowlo/ui/components/songs/SongMetadataCard.kt
  69. +112 −0 app/src/main/java/com/bobbyesp/spowlo/ui/components/songs/metadata_viewer/ExtraInfoCard.kt
  70. +210 −0 app/src/main/java/com/bobbyesp/spowlo/ui/components/songs/metadata_viewer/TrackComponent.kt
  71. +101 −0 app/src/main/java/com/bobbyesp/spowlo/ui/components/songs/search_feat/SearchingSongComponent.kt
  72. +56 −0 app/src/main/java/com/bobbyesp/spowlo/ui/components/text/AnimatedTextCount.kt
  73. +85 −5 app/src/main/java/com/bobbyesp/spowlo/ui/components/{ → text}/SharedText.kt
  74. +47 −78 app/src/main/java/com/bobbyesp/spowlo/ui/dialogs/DownloaderSettingsDialog.kt
  75. +44 −0 app/src/main/java/com/bobbyesp/spowlo/ui/dialogs/NotificationPermissionDialog.kt
  76. +2 −2 app/src/main/java/com/bobbyesp/spowlo/ui/dialogs/UpdaterBottomDrawer.kt
  77. +658 −0 app/src/main/java/com/bobbyesp/spowlo/ui/dialogs/bottomsheets/DownloaderBottomSheet.kt
  78. +242 −0 app/src/main/java/com/bobbyesp/spowlo/ui/dialogs/bottomsheets/PagerUtils.kt
  79. +54 −0 app/src/main/java/com/bobbyesp/spowlo/ui/ext/PagingExt.kt
  80. +111 −0 app/src/main/java/com/bobbyesp/spowlo/ui/icons/artist.kt
  81. +98 −0 app/src/main/java/com/bobbyesp/spowlo/ui/icons/yt_music.kt
  82. +398 −240 app/src/main/java/com/bobbyesp/spowlo/ui/pages/InitialEntry.kt
  83. +6 −24 app/src/main/java/com/bobbyesp/spowlo/ui/pages/MarkdownViewerPage.kt
  84. +69 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/common_pages/ErrorPage.kt
  85. +49 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/common_pages/LoadingPage.kt
  86. +38 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/common_pages/NotImplementedPage.kt
  87. +125 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/download_tasks/DownloadTasksPage.kt
  88. +185 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/download_tasks/FullscreenConsoleOutput.kt
  89. +153 −101 app/src/main/java/com/bobbyesp/spowlo/ui/pages/downloader/DownloaderPage.kt
  90. +7 −10 app/src/main/java/com/bobbyesp/spowlo/ui/pages/downloader/DownloaderViewModel.kt
  91. +0 −2 app/src/main/java/com/bobbyesp/spowlo/ui/pages/downloader/FullscreenConsoleOutput.kt
  92. +153 −142 app/src/main/java/com/bobbyesp/spowlo/ui/pages/history/DownloadHistoryBottomDrawer.kt
  93. +129 −128 app/src/main/java/com/bobbyesp/spowlo/ui/pages/history/DownloadsHistoryPage.kt
  94. +9 −7 app/src/main/java/com/bobbyesp/spowlo/ui/pages/history/DownloadsHistoryViewModel.kt
  95. +38 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/metadata_viewer/binders/SpotifyInfoBinder.kt
  96. +167 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/metadata_viewer/pages/AlbumPage.kt
  97. +185 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/metadata_viewer/pages/ArtistPage.kt
  98. +196 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/metadata_viewer/pages/PlaylistViewPage.kt
  99. +226 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/metadata_viewer/pages/TrackPage.kt
  100. +144 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/metadata_viewer/playlists/PlaylistPageViewModel.kt
  101. +132 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/metadata_viewer/playlists/SpotifyItemPage.kt
  102. +2 −4 app/src/main/java/com/bobbyesp/spowlo/ui/pages/mod_downloader/ModsDownloaderPage.kt
  103. +3 −6 app/src/main/java/com/bobbyesp/spowlo/ui/pages/mod_downloader/ModsDownloaderViewModel.kt
  104. +1 −6 app/src/main/java/com/bobbyesp/spowlo/ui/pages/playlist/PlaylistMetadataPage.kt
  105. +444 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/searcher/SearcherPage.kt
  106. +245 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/searcher/SearcherPageViewModel.kt
  107. +193 −92 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/SettingsPage.kt
  108. +2 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/about/AboutPage.kt
  109. +43 −14 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/appearance/AppThemePreferencesPage.kt
  110. +198 −150 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/appearance/AppearancePage.kt
  111. +34 −11 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/appearance/LanguagePage.kt
  112. +6 −6 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/cookies/CookiesSettingsPage.kt
  113. +1 −1 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/cookies/CookiesSettingsViewModel.kt
  114. +10 −8 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/cookies/WebViewPage.kt
  115. +61 −40 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/directories/DownloadsDirectoriesPage.kt
  116. +3 −5 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/documentation/DocumentationPage.kt
  117. +595 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/downloader/DownloaderSettingsPage.kt
  118. +396 −0 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/downloader/FormatSettingsDialogs.kt
  119. +0 −76 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/format/AudioProviderDialog.kt
  120. +0 −120 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/format/FormatSettingsDialogs.kt
  121. +0 −136 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/format/SettingsFormatsPage.kt
  122. +216 −82 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/general/GeneralSettingsPage.kt
  123. +0 −5 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/spotify/SpotifySettingsDialogs.kt
  124. +126 −35 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/spotify/SpotifySettingsPage.kt
  125. +19 −6 app/src/main/java/com/bobbyesp/spowlo/ui/pages/settings/updater/UpdaterPage.kt
  126. +0 −55 app/src/main/java/com/bobbyesp/spowlo/ui/pages/spotify/setup/SpotifySetupPage.kt
  127. +1 −0 app/src/main/java/com/bobbyesp/spowlo/ui/theme/ColorScheme.kt
  128. +0 −7 app/src/main/java/com/bobbyesp/spowlo/ui/theme/Theme.kt
  129. +1 −4 app/src/main/java/com/bobbyesp/spowlo/utils/DatabaseUtil.kt
  130. +325 −114 app/src/main/java/com/bobbyesp/spowlo/utils/DownloaderUtil.kt
  131. +16 −12 app/src/main/java/com/bobbyesp/spowlo/utils/FilesUtil.kt
  132. +21 −0 app/src/main/java/com/bobbyesp/spowlo/utils/ListUtil.kt
  133. +257 −0 app/src/main/java/com/bobbyesp/spowlo/utils/NotificationsUtil.kt
  134. +78 −68 app/src/main/java/com/bobbyesp/spowlo/utils/PreferencesUtil.kt
  135. +19 −9 app/src/main/java/com/bobbyesp/spowlo/utils/TextUtils.kt
  136. +19 −35 app/src/main/java/com/bobbyesp/spowlo/utils/UpdateUtil.kt
  137. +4 −4 app/src/main/res/drawable/github_mark.xml
  138. +16 −16 app/src/main/res/drawable/ic_launcher_foreground.xml
  139. +13 −13 app/src/main/res/drawable/ic_launcher_monochrome.xml
  140. +12 −5 app/src/main/res/drawable/icons8_youtube.xml
  141. +10 −0 app/src/main/res/drawable/outline_cancel_24.xml
  142. +10 −0 app/src/main/res/drawable/outline_content_copy_24.xml
  143. +3 −1 app/src/main/res/drawable/spotify_logo.xml
  144. +1 −2 app/src/main/res/drawable/telegram_icon.xml
  145. +16 −7 app/src/main/res/drawable/youtube_music_icons8.xml
  146. +3 −3 app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  147. +2 −2 app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  148. +8 −4 app/src/main/res/raw/index.md
  149. +97 −1 app/src/main/res/values-es/strings.xml
  150. +142 −30 app/src/main/res/values/strings.xml
  151. +1 −2 app/src/test/java/com/bobbyesp/spowlo/ExampleUnitTest.kt
  152. +6 −2 build.gradle.kts
  153. +12 −15 color/build.gradle.kts
  154. +3 −0 color/proguard-rules.pro
  155. +0 −242 color/src/main/java/com/kyant/monet/Color.kt
  156. +0 −99 color/src/main/java/com/kyant/monet/Hct.kt
  157. +0 −83 color/src/main/java/com/kyant/monet/Math.kt
  158. +22 −26 color/src/main/java/com/kyant/monet/Monet.kt
  159. +8 −1 color/src/main/java/com/kyant/monet/PaletteStyle.kt
  160. +71 −21 color/src/main/java/com/kyant/monet/TonalPalettes.kt
  161. +385 −0 color/src/main/java/io/material/hct/Cam16.kt
  162. +158 −0 color/src/main/java/io/material/hct/Hct.kt
  163. +681 −0 color/src/main/java/io/material/hct/HctSolver.kt
  164. +158 −0 color/src/main/java/io/material/hct/ViewingConditions.kt
  165. +264 −0 color/src/main/java/io/material/utils/ColorUtils.kt
  166. +132 −0 color/src/main/java/io/material/utils/MathUtils.kt
  167. +31 −0 color/src/main/java/io/material/utils/StringUtils.kt
  168. +2 −1 gradle.properties
  169. +58 −56 gradle/libs.versions.toml
  170. +1 −1 gradle/wrapper/gradle-wrapper.properties
  171. +6 −0 settings.gradle.kts
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -13,3 +13,5 @@
.externalNativeBuild
.cxx
local.properties
keystore.properties
/.idea/deploymentTargetSelector.xml
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

26 changes: 26 additions & 0 deletions .idea/appInsightsSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -25,9 +25,7 @@ A Spotify songs downloader powered by [spotDL](https://github.com/spotDL/spotify
</div>

## ⚠️ Warning
The Spotify mods downloader has been deleted by request of the xManager team. This is because having the mod downloader in Spowlo meant an avoid of their ads/earning methods. xManager has to pay servers and they pay those just for making the users have free Spotify, I hope that you all understand.

please, instead use the [xManager app](https://github.com/xManager-App/xManager). Maybe somme day I create an app for them who knows haha
Spowlo uses YT Music and YouTube to download the songs. This is because Spotify DRM bypassing can lead to an account ban and legal issues. If YT Music isn't available in your country, don't worry, you can still use YouTube as audio provider or use a VPN. We are working on making a regional bypass so don't matter your region. Thank you for understanding.

## 🔮 Features

@@ -51,6 +49,11 @@ For most devices, it is recommended to install the **ARM64-v8a** version of the

- Download the latest stable version from [GitHub releases](https://github.com/BobbyESP/Spowlo/releases/latest)

## Translation

We are using Hosted Weblate for the translations of the app. if you want to contribute follow [this link](https://hosted.weblate.org/engage/spowlo/) 🖇️


## 📖Credits
Thanks to [xnetcat](https://github.com/xnetcat) for it's help with some spotDL related things!

110 changes: 75 additions & 35 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import java.io.FileInputStream
import java.util.Locale
import java.util.Properties

plugins {
id("com.android.application")
id("kotlin-android")
id("kotlin-kapt")
id("com.google.devtools.ksp")
id("org.jetbrains.kotlin.android")
kotlin("plugin.serialization")
alias(libs.plugins.compose.compiler)
}
apply(plugin = "dagger.hilt.android.plugin")

@@ -17,6 +19,10 @@ sealed class Version(
val versionBuild: Int = 0
) {
abstract fun toVersionName(): String

fun toVersionCode(): Int =
versionMajor * 1000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild

class Beta(versionMajor: Int, versionMinor: Int, versionPatch: Int, versionBuild: Int) :
Version(versionMajor, versionMinor, versionPatch, versionBuild) {
override fun toVersionName(): String =
@@ -43,7 +49,7 @@ sealed class Version(

val currentVersion: Version = Version.Stable(
versionMajor = 1,
versionMinor = 2,
versionMinor = 5,
versionPatch = 1,
)

@@ -66,12 +72,15 @@ android {
}
}

compileSdk = 33
val localProperties = Properties()
localProperties.load(FileInputStream(rootProject.file("local.properties")))

compileSdk = 34
defaultConfig {
applicationId = "com.bobbyesp.spowlo"
minSdk = 26
targetSdk = 33
versionCode = 10201
targetSdk = 34
versionCode = currentVersion.toVersionCode()

versionName = currentVersion.toVersionName().run {
if (!splitApks) "$this-(F-Droid)"
@@ -81,11 +90,8 @@ android {
vectorDrawables {
useSupportLibrary = true
}
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas")
}
correctErrorTypes = true
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}
if (!splitApks)
ndk {
@@ -99,34 +105,57 @@ android {
abi {
isEnable = !project.hasProperty("noSplits")
reset()
include("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
include("arm64-v8a", "armeabi-v7a")
isUniversalApk = false
}
}

buildTypes {
release {
isMinifyEnabled = true
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
packaging {
resources.excludes.add("META-INF/*.kotlin_module")
}
if (keystorePropertiesFile.exists())
signingConfig = signingConfigs.getByName("debug")
//add client id and secret to build config
buildConfigField("String", "CLIENT_ID", "\"${localProperties["CLIENT_ID"]}\"")
buildConfigField(
"String",
"CLIENT_SECRET",
"\"${localProperties["CLIENT_SECRET"]}\""
)
matchingFallbacks.add(0, "debug")
matchingFallbacks.add(1, "release")
}
debug {
if (keystorePropertiesFile.exists())
signingConfig = signingConfigs.getByName("debug")
packaging {
resources.excludes.add("META-INF/*.kotlin_module")
}
buildConfigField("String", "CLIENT_ID", "\"${localProperties["CLIENT_ID"]}\"")
buildConfigField(
"String",
"CLIENT_SECRET",
"\"${localProperties["CLIENT_SECRET"]}\""
)
System.setProperty("CLIENT_ID", "\"${localProperties["CLIENT_ID"]}\"")
System.setProperty("CLIENT_SECRET", "\"${localProperties["CLIENT_SECRET"]}\"")
matchingFallbacks.add(0, "debug")
matchingFallbacks.add(1, "release")
applicationIdSuffix = ".debug"
resValue("string", "app_name", "Spowlo (Debug)")
isMinifyEnabled = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}

buildFeatures {
compose = true
buildConfig = true
}

lint {
@@ -143,10 +172,7 @@ android {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.RequiresOptIn"
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get()
}
packagingOptions {
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
excludes += "META-INF/*.kotlin_module"
@@ -156,6 +182,10 @@ android {
namespace = "com.bobbyesp.spowlo"
}

kotlin {
jvmToolchain(21)
}

dependencies {

implementation(project(":color"))
@@ -183,23 +213,24 @@ dependencies {
implementation(libs.accompanist.permissions)
implementation(libs.accompanist.navigation.animation)
implementation(libs.accompanist.webview)
implementation(libs.accompanist.pager.layouts)
implementation(libs.accompanist.pager.indicators)
implementation(libs.accompanist.flowlayout)
implementation(libs.accompanist.material)
implementation(libs.accompanist.pager.indicators)
implementation(libs.paging.compose)
implementation(libs.paging.runtime)

implementation(libs.coil.kt.compose)

implementation(libs.kotlinx.serialization.json)

implementation(libs.androidx.hilt.navigation.compose)
kapt(libs.hilt.ext.compiler)
ksp(libs.hilt.ext.compiler)
implementation(libs.hilt.android)
kapt(libs.hilt.compiler)
ksp(libs.hilt.compiler)

implementation(libs.room.runtime)
implementation(libs.room.ktx)
kapt(libs.room.compiler)
ksp(libs.room.compiler)

//spotDL library
implementation(libs.spotdl.android.library)
@@ -209,17 +240,11 @@ dependencies {

// okhttp
implementation(libs.okhttp)
implementation(libs.bundles.ktor)
//MMKV
implementation(libs.mmkv)

implementation(libs.markdown)
//Exoplayer
implementation(libs.exoplayer.core)
implementation(libs.exoplayer.ui)
implementation(libs.exoplayer.dash)
implementation(libs.exoplayer.smoothstreaming)
implementation(libs.exoplayer.extension.mediasession)

implementation(libs.customtabs)

debugImplementation(libs.crash.handler)
@@ -230,5 +255,20 @@ dependencies {
// androidTestImplementation(libs.androidx.compose.ui.test)

debugImplementation(libs.androidx.compose.ui.tooling)
}

fun String.capitalizeWord(): String {
return this.replaceFirstChar {
if (it.isLowerCase()) it.titlecase(
Locale.getDefault()
) else it.toString()
}
}

class RoomSchemaArgProvider(
@get:InputDirectory @get:PathSensitive(PathSensitivity.RELATIVE) val schemaDir: File
) : CommandLineArgumentProvider {
override fun asArguments(): Iterable<String> {
return listOf("room.schemaLocation=${schemaDir.path}")
}
}
Loading