Accompanist Lyrics Core is published to Maven Central, so no additional repository configuration is needed for most projects. The steps below cover a standard JVM project, a Kotlin Multiplatform project, and the optional version-catalog approach.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/6xingyv/accompanist-lyrics-core/llms.txt
Use this file to discover all available pages before exploring further.
Ensure Maven Central is in your repositories block
Maven Central is included by default in projects created with recent versions of the Gradle wrapper or Android Studio. Verify your root
settings.gradle.kts (or build.gradle.kts for single-module projects) includes the following:If you are using a
dependencyResolutionManagement block in settings.gradle.kts, add mavenCentral() inside the repositories { } block there instead.Add the dependency
The dependency coordinates are the same regardless of platform. Add the artifact to the relevant Kotlin Multiplatform projectIn a KMP project, place the dependency in
dependencies block for your module type.JVM or Android projectcommonMain so it is available on every configured target:Using Gradle version catalogs
If your project uses alibs.versions.toml catalog (the default for new projects created in Android Studio Hedgehog and later), you can declare the dependency there to share it across modules.
gradle/libs.versions.toml
build.gradle.kts
sourceSets block:
Supported targets
The artifact ships compiled outputs for all of the following Kotlin Multiplatform targets. You do not need to change the dependency declaration when adding or changing targets in your own project — Gradle resolves the correct variant automatically.| Platform | Target |
|---|---|
| JVM (any — server, desktop, Android via JVM) | jvm |
| JavaScript via IR compiler | js(IR) — browser and Node.js |
| WebAssembly | wasmJs — browser and Node.js |
| macOS (Intel) | macosX64 |
| macOS (Apple Silicon) | macosArm64 |
| iOS device (arm64) | iosArm64 |
| iOS simulator (x86-64) | iosX64 |
| iOS simulator (Apple Silicon) | iosSimulatorArm64 |
Transitive dependencies
The library brings inkotlinx-serialization-json as a transitive dependency (used internally for TTML and structured format parsing). If your project already declares a different version of kotlinx-serialization-json, Gradle will resolve the conflict according to its standard version-selection rules. In most cases no manual alignment is required.