first commit
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.jetbrains.compose)
|
||||
alias(libs.plugins.kotlinx.serialization)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
listOf(
|
||||
iosX64(),
|
||||
iosArm64(),
|
||||
iosSimulatorArm64()
|
||||
).forEach { iosTarget ->
|
||||
iosTarget.binaries.framework {
|
||||
baseName = "ComposeApp"
|
||||
isStatic = true
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
androidMain.dependencies {
|
||||
implementation(compose.preview)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
|
||||
// Ktor Android Engine
|
||||
implementation(libs.ktor.client.okhttp)
|
||||
|
||||
// Android media playback
|
||||
implementation(libs.media3.exoplayer)
|
||||
implementation(libs.media3.session)
|
||||
implementation(libs.media3.datasource)
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
}
|
||||
|
||||
commonMain.dependencies {
|
||||
implementation(compose.runtime)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.material)
|
||||
implementation(compose.material3)
|
||||
implementation(compose.ui)
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.components.uiToolingPreview)
|
||||
implementation(compose.materialIconsExtended)
|
||||
|
||||
// Architecture
|
||||
implementation(libs.androidx.lifecycle.viewmodel)
|
||||
implementation(libs.androidx.lifecycle.runtime.compose)
|
||||
|
||||
// Navigation - Using standard Compose Navigation since we are in 1.6.10+
|
||||
implementation("org.jetbrains.androidx.navigation:navigation-compose:2.7.0-alpha07")
|
||||
|
||||
// Ktor Client Core
|
||||
implementation(libs.ktor.client.core)
|
||||
implementation(libs.ktor.client.content.negotiation)
|
||||
implementation(libs.ktor.serialization.kotlinx.json)
|
||||
|
||||
// Coil3 Multiplatform Image Loader
|
||||
implementation(libs.coil.compose)
|
||||
implementation(libs.coil.network.ktor)
|
||||
|
||||
implementation(libs.kotlinx.coroutines.core)
|
||||
}
|
||||
|
||||
iosMain.dependencies {
|
||||
// Ktor iOS Engine
|
||||
implementation(libs.ktor.client.darwin)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.example.music"
|
||||
compileSdk = 35
|
||||
|
||||
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
||||
sourceSets["main"].res.srcDirs("src/androidMain/res")
|
||||
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.berdoff.music"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 1
|
||||
versionName = "1.0.0"
|
||||
}
|
||||
packaging {
|
||||
resources {
|
||||
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
isMinifyEnabled = false
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
debugImplementation(compose.uiTooling)
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
@file:OptIn(
|
||||
org.jetbrains.compose.resources.InternalResourceApi::class,
|
||||
org.jetbrains.compose.resources.ExperimentalResourceApi::class,
|
||||
)
|
||||
|
||||
package musicmultiplatform.composeapp.generated.resources
|
||||
|
||||
import kotlin.ByteArray
|
||||
import kotlin.OptIn
|
||||
import kotlin.String
|
||||
import org.jetbrains.compose.resources.ExperimentalResourceApi
|
||||
import org.jetbrains.compose.resources.getResourceUri
|
||||
import org.jetbrains.compose.resources.readResourceBytes
|
||||
|
||||
internal object Res {
|
||||
/**
|
||||
* Reads the content of the resource file at the specified path and returns it as a byte array.
|
||||
*
|
||||
* Example: `val bytes = Res.readBytes("files/key.bin")`
|
||||
*
|
||||
* @param path The path of the file to read in the compose resource's directory.
|
||||
* @return The content of the file as a byte array.
|
||||
*/
|
||||
@ExperimentalResourceApi
|
||||
public suspend fun readBytes(path: String): ByteArray = readResourceBytes("" + path)
|
||||
|
||||
/**
|
||||
* Returns the URI string of the resource file at the specified path.
|
||||
*
|
||||
* Example: `val uri = Res.getUri("files/key.bin")`
|
||||
*
|
||||
* @param path The path of the file in the compose resource's directory.
|
||||
* @return The URI string of the file.
|
||||
*/
|
||||
@ExperimentalResourceApi
|
||||
public fun getUri(path: String): String = getResourceUri("" + path)
|
||||
|
||||
public object drawable
|
||||
|
||||
public object string
|
||||
|
||||
public object array
|
||||
|
||||
public object plurals
|
||||
|
||||
public object font
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -0,0 +1,2 @@
|
||||
#- File Locator -
|
||||
listingFile=../../../outputs/apk/debug/output-metadata.json
|
||||
@@ -0,0 +1,2 @@
|
||||
appMetadataVersion=1.1
|
||||
androidGradlePluginVersion=8.2.2
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "COMPATIBLE_SCREEN_MANIFEST",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.berdoff.music",
|
||||
"variantName": "debug",
|
||||
"elements": []
|
||||
}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
8
|
||||
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user