42 lines
1.3 KiB
Kotlin
42 lines
1.3 KiB
Kotlin
plugins {
|
|
id("gwenedeg.kmp.library")
|
|
}
|
|
|
|
kotlin {
|
|
androidLibrary {
|
|
namespace = "fr.ajaury.gwenedeg.core.audioplayer"
|
|
}
|
|
|
|
sourceSets {
|
|
androidMain.dependencies {
|
|
// Player audio
|
|
implementation(libs.media3.exoplayer)
|
|
implementation(libs.media3.common)
|
|
}
|
|
jvmMain.dependencies {
|
|
// Desktop audio: Ogg Vorbis SPI so javax.sound.sampled can decode .ogg
|
|
implementation(libs.vorbisspi)
|
|
}
|
|
commonMain.dependencies {
|
|
// Models (exposed through AudioPlayer's public API)
|
|
// api(projects.core.model)
|
|
|
|
// Coroutines
|
|
implementation(libs.kotlinx.coroutinesCore)
|
|
|
|
// DI
|
|
implementation(project.dependencies.platform(libs.koin.bom))
|
|
implementation(libs.koin.core)
|
|
}
|
|
// webMain is the js + wasmJs intermediate source set from the default hierarchy template.
|
|
webMain.dependencies {
|
|
// Browser audio (HTMLAudioElement, document) for js + wasmJs
|
|
implementation(libs.kotlinx.browser)
|
|
}
|
|
wasmJsMain {
|
|
// HTMLAudioElement interop on Wasm requires this opt-in.
|
|
languageSettings.optIn("kotlin.js.ExperimentalWasmJsInterop")
|
|
}
|
|
}
|
|
}
|