Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
haturatu committed Nov 2, 2024
1 parent 7781f93 commit 66eaf05
Show file tree
Hide file tree
Showing 594 changed files with 41,330 additions and 17,829 deletions.
155 changes: 119 additions & 36 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeFeatureFlag

plugins {
id("com.android.application")
kotlin("android")
kotlin("kapt")
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.ksp)
}

android {
compileSdk = 33
val appId = "${project.group}.android"

namespace = appId
compileSdk = 35

defaultConfig {
applicationId = "it.vfsfitvnm.vimusic"
applicationId = appId

minSdk = 21
targetSdk = 33
versionCode = 20
versionName = "0.5.4"
targetSdk = 35

versionCode = System.getenv("ANDROID_VERSION_CODE")?.toIntOrNull() ?: 12
versionName = project.version.toString()

multiDexEnabled = true
}

splits {
Expand All @@ -22,75 +33,147 @@ android {
}
}

namespace = "it.vfsfitvnm.vimusic"
signingConfigs {
create("ci") {
storeFile = System.getenv("ANDROID_NIGHTLY_KEYSTORE")?.let { file(it) }
storePassword = System.getenv("ANDROID_NIGHTLY_KEYSTORE_PASSWORD")
keyAlias = System.getenv("ANDROID_NIGHTLY_KEYSTORE_ALIAS")
keyPassword = System.getenv("ANDROID_NIGHTLY_KEYSTORE_PASSWORD")
}
}

buildTypes {
debug {
applicationIdSuffix = ".debug"
manifestPlaceholders["appName"] = "Debug"
versionNameSuffix = "-DEBUG"
manifestPlaceholders["appName"] = "ViMusic Debug"
}

release {
versionNameSuffix = "-RELEASE"
isMinifyEnabled = true
isShrinkResources = true
manifestPlaceholders["appName"] = "ViMusic"
signingConfig = signingConfigs.getByName("debug")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}

sourceSets.all {
kotlin.srcDir("src/$name/kotlin")
create("nightly") {
initWith(getByName("release"))
matchingFallbacks += "release"

applicationIdSuffix = ".nightly"
versionNameSuffix = "-NIGHTLY"
manifestPlaceholders["appName"] = "ViMusic Nightly"
signingConfig = signingConfigs.findByName("ci")
}
}

buildFeatures {
compose = true
buildConfig = true
}

compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf("-Xcontext-receivers")
}

kotlinOptions {
freeCompilerArgs += "-Xcontext-receivers"
jvmTarget = "1.8"
packaging {
resources.excludes.add("META-INF/**/*")
}

androidResources {
@Suppress("UnstableApiUsage")
generateLocaleConfig = true
}
}

kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas")
kotlin {
jvmToolchain(libs.versions.jvm.get().toInt())

task("testClasses")
}

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}

composeCompiler {
featureFlags = setOf(
ComposeFeatureFlag.StrongSkipping,
ComposeFeatureFlag.OptimizeNonSkippingGroups
)

if (project.findProperty("enableComposeCompilerReports") == "true") {
val dest = layout.buildDirectory.dir("compose_metrics")
metricsDestination = dest
reportsDestination = dest
}
}

dependencies {
implementation(projects.composePersist)
implementation(projects.composeRouting)
implementation(projects.composeReordering)
coreLibraryDesugaring(libs.desugaring)

implementation(projects.compose.persist)
implementation(projects.compose.preferences)
implementation(projects.compose.routing)
implementation(projects.compose.reordering)

implementation(fileTree(projectDir.resolve("vendor")))

implementation(platform(libs.compose.bom))
implementation(libs.compose.activity)
implementation(libs.compose.foundation)
implementation(libs.compose.ui)
implementation(libs.compose.ui.util)
implementation(libs.compose.ripple)
implementation(libs.compose.shimmer)
implementation(libs.compose.coil)
implementation(libs.compose.lottie)
implementation(libs.compose.material3)

implementation(libs.coil.compose)
implementation(libs.coil.ktor)

implementation(libs.palette)
implementation(libs.monet)
runtimeOnly(projects.core.materialCompat)

implementation(libs.exoplayer)
implementation(libs.exoplayer.workmanager)
implementation(libs.media3.session)
implementation(libs.media)

implementation(libs.room)
kapt(libs.room.compiler)
implementation(libs.workmanager)
implementation(libs.workmanager.ktx)

implementation(projects.innertube)
implementation(projects.kugou)
implementation(libs.credentials)
implementation(libs.credentials.play)

coreLibraryDesugaring(libs.desugaring)
implementation(libs.kotlin.coroutines)
implementation(libs.kotlin.immutable)
implementation(libs.kotlin.datetime)

implementation(libs.room)
ksp(libs.room.compiler)

implementation(libs.log4j)
implementation(libs.slf4j)
implementation(libs.logback)

implementation(projects.providers.github)
implementation(projects.providers.innertube)
implementation(projects.providers.kugou)
implementation(projects.providers.lrclib)
implementation(projects.providers.piped)
implementation(projects.providers.sponsorblock)
implementation(projects.providers.translate)
implementation(projects.core.data)
implementation(projects.core.ui)

detektPlugins(libs.detekt.compose)
detektPlugins(libs.detekt.formatting)
}
16 changes: 15 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation

#noinspection ShrinkerUnresolvedReference
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
static <1>$Companion Companion;
Expand All @@ -9,6 +10,7 @@
static **$* *;
}
-keepclassmembers class <2>$<3> {
#noinspection ShrinkerUnresolvedReference
kotlinx.serialization.KSerializer serializer(...);
}

Expand All @@ -17,9 +19,15 @@
}
-keepclassmembers class <1> {
public static <1> INSTANCE;
#noinspection ShrinkerUnresolvedReference
kotlinx.serialization.KSerializer serializer(...);
}

-if class androidx.credentials.CredentialManager
-keep class androidx.credentials.playservices.** {
*;
}

-keepattributes RuntimeVisibleAnnotations,AnnotationDefault

-dontwarn org.bouncycastle.jsse.BCSSLParameters
Expand All @@ -31,4 +39,10 @@
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE
-dontwarn org.slf4j.impl.StaticLoggerBinder
-dontwarn org.slf4j.impl.StaticLoggerBinder

# Rhino
-keep class org.mozilla.javascript.** { *; }
-keep class org.mozilla.classfile.ClassFileWriter
-dontwarn org.mozilla.javascript.JavaToJSONConverters
-dontwarn org.mozilla.javascript.tools.**
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"formatVersion": 1,
"database": {
"version": 23,
"identityHash": "205c24811149a247279bcbfdc2d6c396",
"identityHash": "7f599a26d50b2917fe68a176f414b0f2",
"entities": [
{
"tableName": "Song",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `title` TEXT NOT NULL, `artistsText` TEXT, `durationText` TEXT, `thumbnailUrl` TEXT, `likedAt` INTEGER, `totalPlayTimeMs` INTEGER NOT NULL, PRIMARY KEY(`id`))",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `title` TEXT NOT NULL, `artistsText` TEXT, `durationText` TEXT, `thumbnailUrl` TEXT, `likedAt` INTEGER, `totalPlayTimeMs` INTEGER NOT NULL, `loudnessBoost` REAL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
Expand Down Expand Up @@ -49,6 +49,12 @@
"columnName": "totalPlayTimeMs",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "loudnessBoost",
"columnName": "loudnessBoost",
"affinity": "REAL",
"notNull": false
}
],
"primaryKey": {
Expand Down Expand Up @@ -666,7 +672,7 @@
],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '205c24811149a247279bcbfdc2d6c396')"
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '7f599a26d50b2917fe68a176f414b0f2')"
]
}
}
Loading

0 comments on commit 66eaf05

Please sign in to comment.