[versions]
# Android
android-compileSdk = "36"
android-minSdk = "21"
android-targetSdk = "36"

# Plugins
android-plugin = "9.2.1"
kotlin = "2.4.10"
kotlin-ksp = "2.3.10"
detekt = "1.23.8"
android-junit5 = "2.0.1"

# KotlinX
coroutines = "1.11.0"
serialization-json = "1.11.0"

# Core
koin = "4.1.1"
koin-compose = "4.1.1"
androidx-core = "1.17.0"
androidx-core-splashscreen = "1.2.0"
androidx-appcompat = "1.7.1"
androidx-activity = "1.11.0"
androidx-documentfile = "1.1.0"
androidx-fragment = "1.8.9"
androidx-work = "2.10.5"
androiddesugarlibs = "2.1.5"

# Lifecycle extensions
androidx-lifecycle = "2.9.4"

# UI
androidx-constraintlayout = "2.2.1"
google-material = "1.13.0"
androidx-webkit = "1.14.0"
modernandroidpreferences = "2.4.0-beta2"

# Compose
compose = "1.9.4"
compose-foundation = "1.9.4"
compose-material = "1.9.4"
compose-material-icons = "1.7.8"

# Network
jellyfin-sdk = "1.7.1"
coil = "3.4.0"

# Media
androidx-media = "1.7.1"
androidx-mediarouter = "1.8.1"
androidx-media3 = "1.8.0"
jellyfin-androidx-media = "1.8.0+1"
playservices = "22.1.0"

# Room
androidx-room = "2.7.2"

# Monitoring
timber = "5.0.1"

# Testing
junit = "6.1.2"
kotest = "6.2.3"
mockk = "1.14.11"
androidx-test-runner = "1.7.0"
androidx-test-espresso = "3.7.0"

[plugins]
android-app = { id = "com.android.application", version.ref = "android-plugin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin-ksp = { id = "com.google.devtools.ksp", version.ref = "kotlin-ksp" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
androidx-room = { id = "androidx.room", version.ref = "androidx-room" }
android-junit5 = { id = "de.mannodermaus.android-junit5", version.ref = "android-junit5" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }

[libraries]
# KotlinX
coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "coroutines" }
coroutines-guava = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-guava", version.ref = "coroutines" }
kotlin-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "serialization-json" }

# Core
koin = { group = "io.insert-koin", name = "koin-android", version.ref = "koin" }
koin-compose = { group = "io.insert-koin", name = "koin-androidx-compose", version.ref = "koin-compose" }
android-gradle = { module = "com.android.tools.build:gradle", version.ref = "android-plugin" }
androidx-core = { group = "androidx.core", name = "core", version.ref = "androidx-core" }
androidx-core-splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "androidx-core-splashscreen" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" }
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "androidx-activity" }
androidx-documentfile = { module = "androidx.documentfile:documentfile", version.ref = "androidx-documentfile" }
androidx-fragment = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "androidx-fragment" }
androidx-work-runtime = { module = "androidx.work:work-runtime-ktx", version.ref = "androidx-work" }
androiddesugarlibs = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "androiddesugarlibs" }

# Lifecycle Extensions
androidx-lifecycle-viewmodel = { group = "androidx.lifecycle", name = "lifecycle-viewmodel", version.ref = "androidx-lifecycle" }
androidx-lifecycle-livedata = { group = "androidx.lifecycle", name = "lifecycle-livedata", version.ref = "androidx-lifecycle" }
androidx-lifecycle-runtime = { group = "androidx.lifecycle", name = "lifecycle-runtime", version.ref = "androidx-lifecycle" }
androidx-lifecycle-common = { group = "androidx.lifecycle", name = "lifecycle-common", version.ref = "androidx-lifecycle" }
androidx-lifecycle-process = { group = "androidx.lifecycle", name = "lifecycle-process", version.ref = "androidx-lifecycle" }

# UI
google-material = { group = "com.google.android.material", name = "material", version.ref = "google-material" }
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" }
androidx-webkit = { group = "androidx.webkit", name = "webkit", version.ref = "androidx-webkit" }
modernandroidpreferences = { group = "de.maxr1998", name = "modernandroidpreferences", version.ref = "modernandroidpreferences" }

# Compose
compose-runtime = { group = "androidx.compose.runtime", name = "runtime", version.ref = "compose" }
compose-ui = { group = "androidx.compose.ui", name = "ui", version.ref = "compose" }
compose-animation = { group = "androidx.compose.animation", name = "animation", version.ref = "compose" }
compose-foundation = { group = "androidx.compose.foundation", name = "foundation", version.ref = "compose-foundation" }
compose-material = { group = "androidx.compose.material", name = "material", version.ref = "compose-material" }
compose-material-icons = { group = "androidx.compose.material", name = "material-icons-core", version.ref = "compose-material-icons" }
compose-material-icons-extended = { group = "androidx.compose.material", name = "material-icons-extended", version.ref = "compose-material-icons" }

# Network
jellyfin-sdk = { group = "org.jellyfin.sdk", name = "jellyfin-core", version.ref = "jellyfin-sdk" }
coil = { group = "io.coil-kt.coil3", name = "coil", version.ref = "coil" }
coil-network = { group = "io.coil-kt.coil3", name = "coil-network-okhttp", version.ref = "coil" }
coil-compose = { group = "io.coil-kt.coil3", name = "coil-compose", version.ref = "coil" }

# Media
androidx-media = { group = "androidx.media", name = "media", version.ref = "androidx-media" }
androidx-mediarouter = { group = "androidx.mediarouter", name = "mediarouter", version.ref = "androidx-mediarouter" }
androidx-media3-common = { module = "androidx.media3:media3-common", version.ref = "androidx-media3" }
androidx-media3-ui = { module = "androidx.media3:media3-ui", version.ref = "androidx-media3" }
androidx-media3-session = { module = "androidx.media3:media3-session", version.ref = "androidx-media3" }
androidx-media3-exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "androidx-media3" }
androidx-media3-exoplayer-hls = { module = "androidx.media3:media3-exoplayer-hls", version.ref = "androidx-media3" }
androidx-media3-datasource-okhttp = { module = "androidx.media3:media3-datasource-okhttp", version.ref = "androidx-media3" }
androidx-media3-cast = { module = "androidx.media3:media3-cast", version.ref = "androidx-media3" }
playservices-cast = { group = "com.google.android.gms", name = "play-services-cast", version.ref = "playservices" }
playservices-castframework = { group = "com.google.android.gms", name = "play-services-cast-framework", version.ref = "playservices" }
jellyfin-androidx-media3-ffmpeg-decoder = { module = "org.jellyfin.media3:media3-ffmpeg-decoder", version.ref = "jellyfin-androidx-media" }

# Room
androidx-room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "androidx-room" }
androidx-room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "androidx-room" }
androidx-room-ktx = { group = "androidx.room", name = "room-ktx", version.ref = "androidx-room" }

# Monitoring
timber = { group = "com.jakewharton.timber", name = "timber", version.ref = "timber" }

# Testing
junit-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit" }
junit-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit" }
kotest-runner = { group = "io.kotest", name = "kotest-runner-junit5-jvm", version.ref = "kotest" }
kotest-assertions = { group = "io.kotest", name = "kotest-assertions-core-jvm", version.ref = "kotest" }
kotest-property = { group = "io.kotest", name = "kotest-property-jvm", version.ref = "kotest" }
mockk = { group = "io.mockk", name = "mockk-android", version.ref = "mockk" }
androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidx-test-runner" }
androidx-test-espresso = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-test-espresso" }

# Detekt plugins
detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-formatting", version.ref = "detekt" }

[bundles]
coroutines = ["coroutines-core", "coroutines-android", "coroutines-guava"]
koin = ["koin", "koin-compose"]
coil = ["coil", "coil-network", "coil-compose"]
androidx-lifecycle = [
    "androidx-lifecycle-viewmodel",
    "androidx-lifecycle-livedata",
    "androidx-lifecycle-runtime",
    "androidx-lifecycle-common",
    "androidx-lifecycle-process",
]
compose = [
    "compose-runtime",
    "compose-ui",
    "compose-foundation",
    "compose-animation",
    "compose-material",
    "compose-material-icons",
    "compose-material-icons-extended",
]
androidx-media3 = [
    "androidx-media3-common",
    "androidx-media3-ui",
    "androidx-media3-session",
    "androidx-media3-exoplayer",
    "androidx-media3-exoplayer-hls",
    "androidx-media3-datasource-okhttp",
    "jellyfin-androidx-media3-ffmpeg-decoder",
]
playservices = [
    "playservices-cast",
    "playservices-castframework",
]
androidx-room = ["androidx-room-runtime"]
kotest = ["kotest-runner", "kotest-assertions", "kotest-property"]
androidx-test = ["androidx-test-runner", "androidx-test-espresso"]
