Skip to content

Commit

Permalink
Unifying the dependencies naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Javernaut committed Mar 31, 2024
1 parent d74ab45 commit 497c3f0
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 56 deletions.
34 changes: 16 additions & 18 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsKotlinAndroid)
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.detekt)
alias(libs.plugins.googleKsp)
alias(libs.plugins.hilt)
alias(libs.plugins.google.ksp)
alias(libs.plugins.google.hilt)
}

android {
Expand Down Expand Up @@ -129,25 +129,23 @@ dependencies {
ksp(libs.dagger.hilt.compiler)
implementation(libs.dagger.hilt.android)

implementation(platform(libs.androidx.compose.bom))
implementation(libs.bundles.compose)

implementation(libs.mediafile)

implementation(libs.bundles.coroutines)

implementation(libs.material)
implementation(libs.bundles.kotlinx.coroutines)

implementation(libs.bundles.lifecycle)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.bundles.androidx.compose)

implementation(libs.bundles.androidx.lifecycle)
implementation(libs.androidx.appcompat)
implementation(libs.palette)
implementation(libs.savedstate)
implementation(libs.viewpager2)
implementation(libs.browser)
implementation(libs.window)
implementation(libs.androidx.palette)
implementation(libs.androidx.savedstate)
implementation(libs.androidx.viewpager2)
implementation(libs.androidx.browser)
implementation(libs.androidx.window)
implementation(libs.androidx.navigation.compose)

implementation(libs.mediafile)
implementation(libs.material)

// TODO replace with own implementation
implementation(libs.liveevent)
}
Expand Down
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
apply(from = "${rootDir}/scripts/read-arguments.gradle")

plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.jetbrainsKotlinAndroid) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.detekt) apply false
alias(libs.plugins.googleKsp) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.google.ksp) apply false
alias(libs.plugins.google.hilt) apply false
}
80 changes: 46 additions & 34 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
[versions]
gradleplugin = "8.3.1"
detektplugin = "1.23.5"
kotlin = "1.9.23"
ksp = "1.9.23-1.0.19"
coroutines = "1.8.0"
lifecycle = "2.7.0"
window = "1.2.0"
navigation = "2.7.7"
androidGradlePlugin = "8.3.1"

dagger = "2.51.1"
kotlin = "1.9.23"
kotlinx-coroutines = "1.8.0"

androidx-lifecycle = "2.7.0"
androidx-window = "1.2.0"
androidx-navigation = "2.7.7"
androidx-activity-compose = "1.8.2"
androidx-compose-bom = "2024.03.00"
androidx-compose-compiler = "1.5.11"

[libraries]
mediafile = "io.github.javernaut:mediafile:1.1.0"
google-ksp = "1.9.23-1.0.19"
google-dagger = "2.51.1"

coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
detekt = "1.23.5"

[libraries]
mediafile = "io.github.javernaut:mediafile:1.1.0"
material = "com.google.android.material:material:1.11.0"
liveevent = "com.github.hadilq.liveevent:liveevent:1.2.0"

lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle" }
lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle" }
lifecycle-viewmodel-savedstate = { module = "androidx.lifecycle:lifecycle-viewmodel-savedstate", version.ref = "lifecycle" }
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }

window = { module = "androidx.window:window", version.ref = "window" }
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewmodel-savedstate = { module = "androidx.lifecycle:lifecycle-viewmodel-savedstate", version.ref = "androidx-lifecycle" }

liveevent = "com.github.hadilq.liveevent:liveevent:1.2.0"
palette = "androidx.palette:palette-ktx:1.0.0"
savedstate = "androidx.savedstate:savedstate:1.2.1"
viewpager2 = "androidx.viewpager2:viewpager2:1.0.0"
browser = "androidx.browser:browser:1.8.0"
androidx-window = { module = "androidx.window:window", version.ref = "androidx-window" }

androidx-palette = "androidx.palette:palette-ktx:1.0.0"
androidx-savedstate = "androidx.savedstate:savedstate:1.2.1"
androidx-viewpager2 = "androidx.viewpager2:viewpager2:1.0.0"
androidx-browser = "androidx.browser:browser:1.8.0"
androidx-appcompat = "androidx.appcompat:appcompat:1.6.1"

androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }
Expand All @@ -47,20 +48,31 @@ androidx-compose-material = { module = "androidx.compose.material:material" }
androidx-compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
androidx-compose-material3 = { module = "androidx.compose.material3:material3" }

androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigation" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-navigation" }

dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" }
dagger-hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "dagger" }
dagger-hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "dagger" }
dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "google-dagger" }
dagger-hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "google-dagger" }
dagger-hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "google-dagger" }

[bundles]
coroutines = ["coroutines-core", "coroutines-android"]
lifecycle = ["lifecycle-viewmodel-ktx", "lifecycle-livedata-ktx", "lifecycle-viewmodel-savedstate"]
compose = ["androidx-compose-runtime", "androidx-compose-ui", "androidx-compose-foundation", "androidx-compose-foundation-layout", "androidx-compose-material", "androidx-compose-material-icons-extended", "androidx-compose-runtime-livedata", "androidx-compose-ui-tooling", "androidx-activity-compose", "androidx-compose-material3"]
kotlinx-coroutines = ["coroutines-core", "coroutines-android"]
androidx-lifecycle = ["androidx-lifecycle-viewmodel-ktx", "androidx-lifecycle-livedata-ktx", "androidx-lifecycle-viewmodel-savedstate"]
androidx-compose = [
"androidx-compose-runtime",
"androidx-compose-ui",
"androidx-compose-foundation",
"androidx-compose-foundation-layout",
"androidx-compose-material",
"androidx-compose-material-icons-extended",
"androidx-compose-runtime-livedata",
"androidx-compose-ui-tooling",
"androidx-activity-compose",
"androidx-compose-material3"
]

[plugins]
androidApplication = { id = "com.android.application", version.ref = "gradleplugin" }
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
googleKsp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
hilt = { id = "com.google.dagger.hilt.android", version.ref = "dagger" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detektplugin" }
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
google-ksp = { id = "com.google.devtools.ksp", version.ref = "google-ksp" }
google-hilt = { id = "com.google.dagger.hilt.android", version.ref = "google-dagger" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }

0 comments on commit 497c3f0

Please sign in to comment.