# Centralized versions for dependencies that share versions
[versions]
accompanist = "0.8.1"
androidx_test = "1.4.0-alpha05"
compose = "1.0.0-beta05"
coroutines = "1.4.3"
dagger_hilt = "2.35.1"
jb_compose = "0.4.0-build188"
kotlin = "1.4.32"
ksp = "1.4.32-1.0.0-alpha08"
lifecycle = "2.4.0-alpha01"
moshix = "0.10.0"
retrofit = "2.9.0"
sqldelight = "1.5.0"

[libraries]
# buildSrc dependencies, they are not used from here for now so manually update buildSrc/build.gradle.kts as well
androidGradlePlugin = "com.android.tools.build:gradle:7.0.0-alpha15"
composeGradlePlugin = { module = "org.jetbrains.compose:compose-gradle-plugin", version.ref = "jb_compose" }
hiltGradlePlugin = { module = "com.google.dagger:hilt-android-gradle-plugin", version.ref = "dagger_hilt" }
jsemverGradlePlugin = "com.github.zafarkhaja:java-semver:0.9.0"
kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kspGradlePlugin = { module = "com.google.devtools.ksp:symbol-processing-gradle-plugin", version.ref = "ksp" }
spotlessGradlePlugin = "com.diffplug.spotless:spotless-plugin-gradle:5.12.4"
sqldelightGradlePlugin = { module = "com.squareup.sqldelight:gradle-plugin", version.ref = "sqldelight" }

# Kotlin dependencies
kotlin-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
kotlin-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
kotlin-coroutines-jvm = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm", version.ref = "coroutines" }

# AndroidX dependencies
androidx-appcompat = "androidx.appcompat:appcompat:1.3.0-rc01"
androidx-browser = "androidx.browser:browser:1.3.0"
androidx-coreLibraryDesugaring = "com.android.tools:desugar_jdk_libs:1.0.10"
androidx-datastore = "androidx.datastore:datastore-preferences:1.0.0-alpha08"
androidx-lifecycle-runtimeKtx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" }
androidx-lifecycle-viewmodelKtx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle" }

# Compose dependencies
androidx-compose-activity = "androidx.activity:activity-compose:1.3.0-alpha06"
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
androidx-compose-lifecycleViewModel = "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha04"
androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "compose" }
androidx-compose-navigation = "androidx.navigation:navigation-compose:1.0.0-alpha10"
androidx-compose-paging = "androidx.paging:paging-compose:1.0.0-alpha08"
androidx-compose-uiTooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }

# Hilt dependencies
androidx-hilt-dagger = { module = "com.google.dagger:hilt-android", version.ref = "dagger_hilt" }
androidx-hilt-daggerCompiler = { module = "com.google.dagger:hilt-compiler", version.ref = "dagger_hilt" }

# Third-party dependencies
thirdparty-accompanist-coil = { module = "com.google.accompanist:accompanist-coil", version.ref = "accompanist" }
thirdparty-accompanist-flow = { module = "com.google.accompanist:accompanist-flowlayout", version.ref = "accompanist" }
thirdparty-accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" }
thirdparty-kamel = "com.alialbaali.kamel:kamel-image:0.2.0"
thirdparty-pullToRefresh = "com.puculek.pulltorefresh:pull-to-refresh-compose:1.0.1"

# Moshi dependencies
thirdparty-moshi-lib = "com.squareup.moshi:moshi:1.12.0"
thirdparty-moshix-ksp = { module = "dev.zacsweers.moshix:moshi-ksp", version.ref = "moshix" }
thirdparty-moshix-metadatareflect = { module = "dev.zacsweers.moshix:moshi-metadata-reflect", version.ref = "moshix" }

# Retrofit dependencies
thirdparty-retrofit-lib = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
thirdparty-retrofit-moshiConverter = { module = "com.squareup.retrofit2:converter-moshi", version.ref = "retrofit" }

# Sqldelight dependencies
thirdparty-sqldelight-jvmDriver = { module = "com.squareup.sqldelight:sqlite-driver", version.ref = "sqldelight" }
thirdparty-sqldelight-androidDriver = { module = "com.squareup.sqldelight:android-driver", version.ref = "sqldelight" }


# Testing dependencies
androidx-testing-rules = { module = "androidx.test:rules", version.ref = "androidx_test" }
androidx-testing-runner = { module = "androidx.test:runner", version.ref = "androidx_test" }
testing-junit = "junit:junit:4.13.2"
testing-mockWebServer = "com.squareup.okhttp3:mockwebserver3-junit4:5.0.0-alpha.2"
testing-kotlintest-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }

# Bundles of dependencies usually used together so they can be included in one go
[bundles]
androidxLifecycle = ["androidx-lifecycle-runtimeKtx", "androidx-lifecycle-viewmodelKtx"]
testDependencies = ["testing-junit", "testing-kotlintest-junit"]
androidTestDependencies = ["androidx-testing-rules", "androidx-testing-runner"]
