mirror of
https://github.com/Shabinder/SpotiFlyer.git
synced 2024-11-22 17:14:32 +01:00
Notification Fix $ Store Key Conf Added
This commit is contained in:
parent
575a32d223
commit
6821fe0601
@ -14,6 +14,7 @@
|
|||||||
* * along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* * along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
|
||||||
import org.jetbrains.compose.compose
|
import org.jetbrains.compose.compose
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@ -33,7 +34,21 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
val props = gradleLocalProperties(rootDir)
|
||||||
|
|
||||||
|
if(props.containsKey("storeFileDir")) {
|
||||||
|
signingConfigs {
|
||||||
|
create("release") {
|
||||||
|
storeFile = file(props.getProperty("storeFileDir"))
|
||||||
|
storePassword = props.getProperty("storePassword")
|
||||||
|
keyAlias = props.getProperty("keyAlias")
|
||||||
|
keyPassword = props.getProperty("keyPassword")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
compileSdkVersion(29)
|
compileSdkVersion(29)
|
||||||
|
buildToolsVersion = "30.0.3"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.shabinder.spotiflyer"
|
applicationId = "com.shabinder.spotiflyer"
|
||||||
minSdkVersion(Versions.minSdkVersion)
|
minSdkVersion(Versions.minSdkVersion)
|
||||||
@ -41,12 +56,14 @@ android {
|
|||||||
versionCode = Versions.versionCode
|
versionCode = Versions.versionCode
|
||||||
versionName = Versions.versionName
|
versionName = Versions.versionName
|
||||||
}
|
}
|
||||||
buildToolsVersion = "30.0.3"
|
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
getByName("release") {
|
getByName("release") {
|
||||||
isMinifyEnabled = true
|
isMinifyEnabled = true
|
||||||
isShrinkResources = true
|
isShrinkResources = true
|
||||||
|
if(props.containsKey("storeFileDir")){
|
||||||
|
signingConfig = signingConfigs.getByName("release")
|
||||||
|
}
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ import androidx.compose.material.icons.rounded.SystemSecurityUpdate
|
|||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.drawBehind
|
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.platform.LocalView
|
import androidx.compose.ui.platform.LocalView
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
@ -66,7 +65,6 @@ import com.shabinder.common.models.TrackDetails
|
|||||||
import com.shabinder.common.root.SpotiFlyerRoot
|
import com.shabinder.common.root.SpotiFlyerRoot
|
||||||
import com.shabinder.common.root.callbacks.SpotiFlyerRootCallBacks
|
import com.shabinder.common.root.callbacks.SpotiFlyerRootCallBacks
|
||||||
import com.shabinder.common.uikit.*
|
import com.shabinder.common.uikit.*
|
||||||
import com.shabinder.common.uikit.utils.verticalGradientScrim
|
|
||||||
import com.shabinder.spotiflyer.utils.*
|
import com.shabinder.spotiflyer.utils.*
|
||||||
import com.tonyodev.fetch2.Status
|
import com.tonyodev.fetch2.Status
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
object Versions {
|
object Versions {
|
||||||
// App's Version (To be bumped at each update)
|
// App's Version (To be bumped at each update)
|
||||||
const val versionName = "2.2.0"
|
const val versionName = "2.2.5"
|
||||||
|
|
||||||
// Kotlin
|
// Kotlin
|
||||||
const val kotlinVersion = "1.4.32"
|
const val kotlinVersion = "1.4.32"
|
||||||
@ -44,7 +44,7 @@ object Versions {
|
|||||||
const val slf4j = "1.7.30"
|
const val slf4j = "1.7.30"
|
||||||
|
|
||||||
// Android
|
// Android
|
||||||
const val versionCode = 15
|
const val versionCode = 16
|
||||||
const val minSdkVersion = 21
|
const val minSdkVersion = 21
|
||||||
const val compileSdkVersion = 29
|
const val compileSdkVersion = 29
|
||||||
const val targetSdkVersion = 29
|
const val targetSdkVersion = 29
|
||||||
|
@ -57,7 +57,9 @@ actual fun ImageLoad(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Crossfade(pic) {
|
Crossfade(pic) {
|
||||||
if (it == null) Image(PlaceHolderImage(), desc, modifier, contentScale = ContentScale.Crop) else Image(it, desc, modifier, contentScale = ContentScale.Crop)
|
if (it == null) {
|
||||||
|
Image(PlaceHolderImage(), desc, modifier, contentScale = ContentScale.Crop)
|
||||||
|
} else Image(it, desc, modifier, contentScale = ContentScale.Crop)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +106,7 @@ actual fun DownloadAllImage() = painterResource(R.drawable.ic_download_arrow)
|
|||||||
actual fun ShareImage() = painterResource(R.drawable.ic_share_open)
|
actual fun ShareImage() = painterResource(R.drawable.ic_share_open)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
actual fun PlaceHolderImage() = painterResource(R.drawable.music)
|
actual fun PlaceHolderImage() = painterResource(R.drawable.ic_song_placeholder)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
actual fun SpotiFlyerLogo() = painterResource(R.drawable.ic_spotiflyer_logo)
|
actual fun SpotiFlyerLogo() = painterResource(R.drawable.ic_spotiflyer_logo)
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.shabinder.common.di
|
package com.shabinder.common.di
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
import com.shabinder.common.models.TrackDetails
|
import com.shabinder.common.models.TrackDetails
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import com.mpatric.mp3agic.ID3v1Tag
|
import com.mpatric.mp3agic.ID3v1Tag
|
||||||
@ -119,6 +120,7 @@ suspend fun Mp3File.setId3v2TagsAndSaveFile(track: TrackDetails) {
|
|||||||
this.id3v2Tag = id3v2Tag
|
this.id3v2Tag = id3v2Tag
|
||||||
saveFile(track.outputFilePath)
|
saveFile(track.outputFilePath)
|
||||||
} catch (e: java.io.FileNotFoundException) {
|
} catch (e: java.io.FileNotFoundException) {
|
||||||
|
Log.e("Error", "Couldn't Write Cached Mp3 Album Art, error: ${e.stackTrace}")
|
||||||
try {
|
try {
|
||||||
// Image Still Not Downloaded!
|
// Image Still Not Downloaded!
|
||||||
// Lets Download Now and Write it into Album Art
|
// Lets Download Now and Write it into Album Art
|
||||||
@ -134,7 +136,8 @@ suspend fun Mp3File.setId3v2TagsAndSaveFile(track: TrackDetails) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
// log("Error", "Couldn't Write Mp3 Album Art, error: ${e.stackTrace}")
|
Log.e("Error", "Couldn't Write Mp3 Album Art, error:")
|
||||||
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -458,6 +458,7 @@ class ForegroundService : Service(), CoroutineScope {
|
|||||||
serviceJob.cancel()
|
serviceJob.cancel()
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
stopForeground(true)
|
stopForeground(true)
|
||||||
|
stopSelf()
|
||||||
} else {
|
} else {
|
||||||
stopSelf() // System will automatically close it
|
stopSelf() // System will automatically close it
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user