Skip to content

Commit

Permalink
Updated libraries and animated background color change in full screen…
Browse files Browse the repository at this point in the history
… player
  • Loading branch information
BobbyESP committed Jan 7, 2024
1 parent 9c78340 commit 072a959
Show file tree
Hide file tree
Showing 15 changed files with 301 additions and 83 deletions.
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.

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.

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

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

6 changes: 6 additions & 0 deletions .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.

26 changes: 14 additions & 12 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ plugins {
id("dagger.hilt.android.plugin")
id("kotlin-kapt")
id("com.google.protobuf") version "0.9.0"
kotlin("plugin.serialization") version "1.9.0"
}

apply(plugin = "dagger.hilt.android.plugin")

val versionMajor = 0
val versionMinor = 1
val versionPatch = 5
val versionPatch = 6
val versionBuild = 0
val isStable = true

Expand Down Expand Up @@ -173,18 +174,19 @@ ksp {

dependencies {
// Kotlin
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")

// AndroidX
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
implementation("androidx.core:core-ktx:1.10.1")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.palette:palette-ktx:1.0.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.appcompat:appcompat:1.7.0-alpha03")

// Compose
implementation("androidx.navigation:navigation-compose:2.7.0")
implementation("androidx.activity:activity-compose:1.7.2")
implementation("androidx.navigation:navigation-compose:2.7.6")
implementation("androidx.activity:activity-compose:1.8.2")
implementation("androidx.compose.material:material:$compose_version")
implementation("androidx.compose.material3:material3:$compose_m3_version")
implementation("androidx.compose.material:material-icons-extended:$compose_version")
Expand All @@ -203,15 +205,15 @@ dependencies {
implementation("io.github.fornewid:material-motion-compose-navigation:1.0.6")

// Images
implementation("io.coil-kt:coil-compose:2.4.0")
implementation("io.coil-kt:coil-compose:2.2.2")

// DI
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")
implementation("androidx.hilt:hilt-navigation-compose:1.1.0")
implementation("com.google.dagger:hilt-android:$hilt_version")
ksp("com.google.dagger:hilt-compiler:$hilt_version")

// Playback
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.7.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.7.3")
implementation("com.gitlab.mvysny.slf4j:slf4j-handroid:1.7.30")
implementation("androidx.media2:media2-session:$media2_version")
implementation("androidx.media2:media2-player:$media2_version")
Expand All @@ -236,8 +238,8 @@ dependencies {

// Data - Proto
implementation("androidx.datastore:datastore:1.0.0")
implementation("com.google.protobuf:protobuf-java:3.23.2")
implementation("com.tencent:mmkv:1.2.15")
implementation("com.google.protobuf:protobuf-java:3.25.1")
implementation("com.tencent:mmkv:1.3.2")
}

//https://stackoverflow.com/questions/65390807/unresolved-reference-protoc-when-using-gradle-protocol-buffers
Expand Down
93 changes: 62 additions & 31 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down Expand Up @@ -48,40 +48,12 @@
# genericjson gson fixes
-keep,allowobfuscation class * extends xyz.gianlu.librespot.json.JsonWrapper { *; }

# Keep `Companion` object fields of serializable classes.
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
static <1>$Companion Companion;
}

# Keep `serializer()` on companion objects (both default and named) of serializable classes.
-if @kotlinx.serialization.Serializable class ** {
static **$* *;
}
-keepclassmembers class <2>$<3> {
kotlinx.serialization.KSerializer serializer(...);
}

# Keep `INSTANCE.serializer()` of serializable objects.
-if @kotlinx.serialization.Serializable class ** {
public static ** INSTANCE;
}
-keepclassmembers class <1> {
public static <1> INSTANCE;
kotlinx.serialization.KSerializer serializer(...);
}

# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault

# protobuf
-keep class com.spotify.** {*;}
-keep class spotify.** {*;}
-keep class bruhcollective.itaysonlab.swedentricks.** {*;}
-keep class bruhcollective.itaysonlab.jetispot.proto.** {*;}
-keep class com.google.protobuf.Any {*;}
-keep class com.google.protobuf.GeneratedMessageV3 {*;}
-keep class * extends com.google.protobuf.AbstractMessage {*;}

# librespot
Expand Down Expand Up @@ -111,6 +83,7 @@
-keepclassmembers,allowshrinking,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn javax.annotation.**
-dontwarn kotlin.Unit
-dontwarn retrofit2.KotlinExtensions
Expand All @@ -120,5 +93,63 @@
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
-dontwarn kotlinx.serialization.KSerializer
-dontwarn kotlinx.serialization.Serializable

# KotlinX Serialization
# Keep `Companion` object fields of serializable classes.
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
static <1>$Companion Companion;
}

# Keep `serializer()` on companion objects (both default and named) of serializable classes.
-if @kotlinx.serialization.Serializable class ** {
static **$* *;
}
-keepclassmembers class <2>$<3> {
kotlinx.serialization.KSerializer serializer(...);
}

# Keep `INSTANCE.serializer()` of serializable objects.
-if @kotlinx.serialization.Serializable class ** {
public static ** INSTANCE;
}
-keepclassmembers class <1> {
public static <1> INSTANCE;
kotlinx.serialization.KSerializer serializer(...);
}

# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault

# Don't print notes about potential mistakes or omissions in the configuration for kotlinx-serialization classes
# See also https://github.com/Kotlin/kotlinx.serialization/issues/1900
-dontnote kotlinx.serialization.**

#
-dontwarn javax.sound.sampled.AudioFormat$Encoding
-dontwarn javax.sound.sampled.AudioFormat
-dontwarn javax.sound.sampled.AudioSystem
-dontwarn javax.sound.sampled.Control$Type
-dontwarn javax.sound.sampled.Control
-dontwarn javax.sound.sampled.DataLine$Info
-dontwarn javax.sound.sampled.FloatControl$Type
-dontwarn javax.sound.sampled.FloatControl
-dontwarn javax.sound.sampled.Line$Info
-dontwarn javax.sound.sampled.Line
-dontwarn javax.sound.sampled.LineUnavailableException
-dontwarn javax.sound.sampled.Mixer$Info
-dontwarn javax.sound.sampled.Mixer
-dontwarn javax.sound.sampled.SourceDataLine
-dontwarn org.apache.logging.log4j.Level
-dontwarn org.apache.logging.log4j.core.config.Configurator
-dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.BCSSLSocket
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
-dontwarn org.conscrypt.Conscrypt$Version
-dontwarn org.conscrypt.Conscrypt
-dontwarn org.conscrypt.ConscryptHostnameVerifier
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE
-dontwarn kotlinx.serialization.internal.ClassValueReferences
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ class SpAuthManager @Inject constructor(
}.onFailure { th ->
Log.i("SpAuthManager", "auth stored failure", th)
AuthResult.Exception(Exception(th))
try {
reset()
} catch (e: Exception) {
Log.i("SpAuthManager", "auth stored failure: reset failed")
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ fun AppNavigation(
) {
val slideDistance = rememberSlideDistance()

LaunchedEffect(true) {
val isLogged = sessionManager.isSignedIn()
Log.d("Test", "isLogged: $isLogged")
if (isLogged) return@LaunchedEffect
LaunchedEffect(Unit) {
if (sessionManager.isSignedIn()) return@LaunchedEffect
authManager.authStored()
navController.navigate(if (isLogged) Screen.Feed.route else Screen.Authorization.route) {
navController.navigate(if (sessionManager.isSignedIn()) Screen.Feed.route else Screen.Authorization.route) {
popUpTo(Screen.NavGraph.route)
}
}
Expand Down
Loading

0 comments on commit 072a959

Please sign in to comment.