Split the shared code into a core module
The Yandex Music client, the player, the app state and the stores move from the TV app to :core (it.panov.musyx.*), so a phone app can build on them. The TV app becomes :tv with the same application id. CoverHues, SessionPlayer and the strings the state layer shows move with them; LRCLIB's user agent is set by each app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
90ac73facc
commit
4c978efa80
121 files changed
+464
-397
No files matched your search
@@ -0,0 +1,75 @@
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.compose)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "it.panov.musyx.tv"
|
||||
compileSdk = 37
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "it.panov.musyx.tv"
|
||||
// Compose (and so Compose for TV) needs API 23.
|
||||
minSdk = 23
|
||||
targetSdk = 37
|
||||
versionCode = 6
|
||||
versionName = "0.1.5"
|
||||
}
|
||||
|
||||
// A release key comes from keystore.properties (gitignored): storeFile, storePassword,
|
||||
// keyAlias, keyPassword. Without one, release builds use the debug key so they still install.
|
||||
val keystore = rootProject.file("keystore.properties").takeIf { it.exists() }?.let { file ->
|
||||
Properties().apply { file.inputStream().use(::load) }
|
||||
}
|
||||
signingConfigs {
|
||||
if (keystore != null) {
|
||||
create("release") {
|
||||
storeFile = rootProject.file(keystore.getProperty("storeFile"))
|
||||
storePassword = keystore.getProperty("storePassword")
|
||||
keyAlias = keystore.getProperty("keyAlias")
|
||||
keyPassword = keystore.getProperty("keyPassword")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig = signingConfigs.findByName("release") ?: signingConfigs.getByName("debug")
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
compose = true
|
||||
buildConfig = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":core"))
|
||||
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
implementation(libs.androidx.lifecycle.runtime.compose)
|
||||
|
||||
implementation(platform(libs.compose.bom))
|
||||
implementation(libs.compose.ui)
|
||||
implementation(libs.compose.ui.graphics)
|
||||
implementation(libs.compose.foundation)
|
||||
implementation(libs.compose.ui.tooling.preview)
|
||||
implementation(libs.tv.material)
|
||||
debugImplementation(libs.compose.ui.tooling)
|
||||
|
||||
implementation(libs.media3.exoplayer)
|
||||
implementation(libs.media3.session)
|
||||
implementation(libs.coil.compose)
|
||||
implementation(libs.coil.network.okhttp)
|
||||
implementation(libs.zxing.core)
|
||||
|
||||
testImplementation(libs.junit)
|
||||
testImplementation(libs.kotlinx.coroutines.test)
|
||||
}
|
||||
Reference in new issue
Block a user