Skip to content

Commit

Permalink
Merge pull request #13 from RLD-JL/version-1.0.6-b
Browse files Browse the repository at this point in the history
Version 1.0.6 b
  • Loading branch information
RLD-JL committed May 31, 2023
2 parents 36bcd46 + ce35d58 commit 920b4f2
Show file tree
Hide file tree
Showing 22 changed files with 159 additions and 74 deletions.
32 changes: 13 additions & 19 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,21 @@ dependencies {
implementation("com.google.android.material:material:1.6.1")
implementation("androidx.appcompat:appcompat:1.4.2")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.5.0-rc02")
implementation("androidx.activity:activity-compose:1.4.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.0-alpha01")
implementation("androidx.activity:activity-compose:1.5.0")
implementation("androidx.palette:palette-ktx:1.0.0")

implementation("androidx.compose.ui:ui-util:1.2.0-rc02")
implementation("androidx.compose.material:material:1.2.0-rc02")
implementation("androidx.compose.ui:ui:1.2.0-rc02")
implementation("androidx.compose.animation:animation:1.2.0-rc02")
debugImplementation("androidx.compose.ui:ui-tooling:1.2.0-rc02")
implementation("androidx.compose.ui:ui-tooling-preview:1.2.0-rc02")
implementation(libs.bundles.compose)
debugImplementation(libs.compose.ui.preview)

implementation ("com.google.android.exoplayer:exoplayer-core:2.18.0")
implementation ("com.google.android.exoplayer:extension-mediasession:2.18.0")
implementation ("com.google.android.exoplayer:exoplayer-ui:2.18.0")
implementation (libs.bundles.exoplayer)

implementation ("dev.chrisbanes.snapper:snapper:0.2.2")
implementation ("androidx.work:work-runtime-ktx:2.7.1")


implementation("androidx.lifecycle:lifecycle-process:2.5.0-rc02")
implementation("androidx.lifecycle:lifecycle-process:2.6.0-alpha01")
implementation("io.coil-kt:coil-compose:2.1.0")
implementation("com.google.dagger:hilt-android:2.42")
kapt("com.google.dagger:hilt-android-compiler:2.42")
Expand All @@ -46,13 +40,13 @@ kapt {
}

android {
compileSdk = 32
compileSdk = 33
defaultConfig {
applicationId = "com.rld.justlisten.android"
minSdk = 21
targetSdk = 32
versionCode = 18
versionName = "1.0.6"
targetSdk = 33
versionCode = 20
versionName = "1.0.6-b"
vectorDrawables {
useSupportLibrary = true
}
Expand All @@ -73,13 +67,13 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "17"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.2.0-beta03"
kotlinCompilerExtensionVersion = "1.2.0"
}

packagingOptions {
Expand Down
10 changes: 9 additions & 1 deletion androidApp/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,12 @@
boolean getASSERTIONS_ENABLED() return false;
boolean getDEBUG() return false;
boolean getRECOVER_STACK_TRACES() return false;
}
}

-dontwarn org.bouncycastle.jsse.BCSSLSocket
-dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
-dontwarn org.conscrypt.*
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE
3 changes: 1 addition & 2 deletions androidApp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.rld.justlisten.android">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import com.rld.justlisten.android.ui.theme.JustListenTheme
import com.rld.justlisten.android.ui.utils.getColorPallet
import com.rld.justlisten.datalayer.datacalls.settings.getSettingsInfo


class MainActivity : ComponentActivity() {

@OptIn(ExperimentalMaterialApi::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object ServiceModule {
@Provides
@ServiceScoped
fun provideAudioAttributes() = AudioAttributes.Builder()
.setContentType(C.CONTENT_TYPE_MUSIC)
.setContentType(C.AUDIO_CONTENT_TYPE_MUSIC)
.setUsage(C.USAGE_MEDIA)
.build()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.rld.justlisten.android.exoplayer.callbacks

import android.app.Service.STOP_FOREGROUND_DETACH
import android.os.Build
import android.widget.Toast
import com.google.android.exoplayer2.ExoPlayer
import com.google.android.exoplayer2.PlaybackException
Expand All @@ -17,7 +19,11 @@ class MusicPlayerEventListener(
override fun onPlayWhenReadyChanged(playWhenReady: Boolean, reason: Int) {
super.onPlayWhenReadyChanged(playWhenReady, reason)
if (reason == Player.STATE_READY && !playWhenReady) {
musicService.stopForeground(false)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
musicService.stopForeground(STOP_FOREGROUND_DETACH)
} else {
musicService.stopForeground(true)
}
musicService.isForegroundService = false
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.rld.justlisten.android.exoplayer.callbacks

import android.app.Notification
import android.app.Service
import android.content.Intent
import android.os.Build
import androidx.core.content.ContextCompat
import com.rld.justlisten.android.exoplayer.MusicService
import com.rld.justlisten.android.exoplayer.utils.Constants.NOTIFICATION_ID
Expand All @@ -13,7 +15,11 @@ class MusicPlayerNotificationListener(
override fun onNotificationCancelled(notificationId: Int, dismissedByUser: Boolean) {
super.onNotificationCancelled(notificationId, dismissedByUser)
musicService.apply {
stopForeground(true)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
musicService.stopForeground(Service.STOP_FOREGROUND_DETACH)
} else {
musicService.stopForeground(true)
}
isForegroundService = false
stopSelf()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fun PlayBarActionsMaximized(
SHUFFLE_MODE_ALL
)
},
painter = painterResource(id = R.drawable.exo_styled_controls_shuffle_off),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_styled_controls_shuffle_off),
contentDescription = null,
)
} else {
Expand All @@ -115,7 +115,7 @@ fun PlayBarActionsMaximized(
SHUFFLE_MODE_NONE
)
},
painter = painterResource(id = R.drawable.exo_styled_controls_shuffle_on),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_styled_controls_shuffle_on),
contentDescription = null,
)
}
Expand All @@ -126,7 +126,7 @@ fun PlayBarActionsMaximized(
.clickable {
musicServiceConnection.transportControls.skipToPrevious()
},
painter = painterResource(id = R.drawable.exo_ic_skip_previous),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_ic_skip_previous),
contentDescription = null,
)
if (musicServiceConnection.playbackState.value?.state != PlaybackState.STATE_PLAYING &&
Expand All @@ -142,7 +142,7 @@ fun PlayBarActionsMaximized(
.weight(0.2f),
onClick = { musicServiceConnection.transportControls.play() }) {
Icon(
painter = painterResource(id = R.drawable.exo_icon_play),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_icon_play),
contentDescription = null
)
}
Expand All @@ -157,14 +157,14 @@ fun PlayBarActionsMaximized(
.weight(0.2f),
onClick = { musicServiceConnection.transportControls.pause() }) {
Icon(
painter = painterResource(id = R.drawable.exo_icon_pause),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_icon_pause),
contentDescription = null
)
}
}

Icon(
painter = painterResource(id = R.drawable.exo_ic_skip_next),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_ic_skip_next),
modifier = Modifier
.size(40.dp)
.clickable(onClick = onSkipNextPressed)
Expand All @@ -181,7 +181,7 @@ fun PlayBarActionsMaximized(
REPEAT_MODE_ONE
)
},
painter = painterResource(id = R.drawable.exo_controls_repeat_off),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_controls_repeat_off),
contentDescription = null,
)
REPEAT_MODE_ONE -> Icon(
Expand All @@ -193,7 +193,7 @@ fun PlayBarActionsMaximized(
REPEAT_MODE_ALL
)
},
painter = painterResource(id = R.drawable.exo_controls_repeat_one),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_controls_repeat_one),
contentDescription = null,
)
REPEAT_MODE_ALL -> Icon(
Expand All @@ -205,7 +205,7 @@ fun PlayBarActionsMaximized(
REPEAT_MODE_NONE
)
},
painter = painterResource(id = R.drawable.exo_controls_repeat_all),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_controls_repeat_all),
contentDescription = null,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.rld.justlisten.android.R
import com.rld.justlisten.android.exoplayer.MusicServiceConnection
import com.rld.justlisten.android.exoplayer.library.extension.artist
import com.rld.justlisten.android.ui.theme.typography
Expand All @@ -33,7 +32,6 @@ fun PlayBarActionsMinimized(
Row(
Modifier
.graphicsLayer(alpha = 1f - currentFraction * 2)
.height(IntrinsicSize.Max)
.clickable(onClick = playBarMinimizedClicked)
) {
if (currentFraction != 1f) {
Expand Down Expand Up @@ -106,7 +104,7 @@ fun PlayBarActionsMinimized(
musicServiceConnection.playbackState.value?.state != PlaybackState.STATE_BUFFERING
) {
Icon(
painter = painterResource(id = R.drawable.exo_icon_play),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_icon_play),
modifier = Modifier
.padding(8.dp)
.clickable(
Expand All @@ -122,7 +120,7 @@ fun PlayBarActionsMinimized(
)
if (musicServiceConnection.playbackState.value?.state == PlaybackState.STATE_PLAYING) {
Icon(
painter = painterResource(id = R.drawable.exo_icon_pause),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_icon_pause),
modifier = Modifier
.padding(8.dp)
.clickable(
Expand All @@ -133,7 +131,7 @@ fun PlayBarActionsMinimized(
)
}
Icon(
painter = painterResource(id = R.drawable.exo_ic_skip_next),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_ic_skip_next),
modifier = Modifier
.padding(8.dp)
.clickable(onClick = onSkipNextPressed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.rld.justlisten.android.R
import com.rld.justlisten.android.exoplayer.MusicService.Companion.curSongDuration
import com.rld.justlisten.android.exoplayer.MusicServiceConnection
import com.rld.justlisten.android.ui.extensions.noRippleClickable
Expand Down Expand Up @@ -96,7 +95,7 @@ fun IsLoading(isLoading: Boolean, modifier: Modifier) {
) {
CircularProgressIndicator()
Icon(
painter = painterResource(id = R.drawable.exo_icon_pause),
painter = painterResource(id = com.google.android.exoplayer2.ui.R.drawable.exo_icon_pause),
modifier = modifier.size(35.dp),
contentDescription = null
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fun SettingsScreen(
Row(modifier = Modifier.fillMaxWidth().weight(1f, false),
horizontalArrangement = Arrangement.Center)
{
Text(text ="App version:1.0.6")
Text(text ="App version:1.0.6-fix")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ fun SettingsContent(
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = "Has Bottom Donation Navigation",
text = "Has Bottom Donation Navigation \nDisabled thanks to google",
style = MaterialTheme.typography.h6.copy(fontSize = 14.sp)
)
Switch(
enabled = false,
checked = settings.hasDonationNavigationOn,
modifier = Modifier.padding(8.dp),
onCheckedChange = {
Expand Down
13 changes: 5 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ buildscript {
mavenCentral()
}

val kotlin_version = "1.6.21"

dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
classpath("com.android.tools.build:gradle:7.2.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlinVersion.get()}")
classpath("com.android.tools.build:gradle:8.0.1")
classpath("com.squareup.sqldelight:gradle-plugin:1.5.3")
classpath ("com.google.dagger:hilt-android-gradle-plugin:2.40.1")

classpath ("com.google.dagger:hilt-android-gradle-plugin:2.42")
}
}

Expand All @@ -27,9 +24,9 @@ tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}

/*

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>{
kotlinOptions {
freeCompilerArgs = listOf("-Xuse-k2")
}
}*/
}
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
kotlin.code.style=official

#Android
android.useAndroidX=true
android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=true
android.nonFinalResIds=false
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Aug 11 15:11:38 EEST 2021
#Fri Jul 22 21:14:22 EEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Loading

0 comments on commit 920b4f2

Please sign in to comment.