Skip to content

Commit

Permalink
Migrate to Gradle Version Catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
AlirezaIvaz committed Jun 21, 2023
1 parent 54df51b commit dd74b9b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 15 deletions.
25 changes: 12 additions & 13 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("com.android.application")
id("kotlin-android")
alias(libs.plugins.application)
alias(libs.plugins.kotlin)
}

android {
Expand Down Expand Up @@ -55,15 +55,14 @@ android {
}

dependencies {
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
implementation("androidx.preference:preference-ktx:1.2.0")
implementation("androidx.fragment:fragment-ktx:1.5.7")
implementation("androidx.core:core-ktx:1.10.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")

val lifecycle_version = "2.6.1"
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version")
implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycle_version")
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.core.splashscreen)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.fragment.ktx)
implementation(libs.androidx.lifecycle.common)
implementation(libs.androidx.lifecycle.livedata.ktx)
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.preference.ktx)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.material)
}
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
plugins {
id("com.android.application") version "8.0.2" apply false
id("org.jetbrains.kotlin.android") version "1.8.0" apply false
alias(libs.plugins.application) apply false
alias(libs.plugins.kotlin) apply false
}
30 changes: 30 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[versions]
android = "8.0.2"
fragment-ktx = "1.5.7"
kotlin = "1.8.0"
androidx-core = "1.10.1"
androidx-core-splashscreen = "1.0.1"
androidx-appcompat = "1.6.1"
androidx-fragment = "1.6.0"
androidx-lifecycle = "2.6.1"
androidx-preference = "1.2.0"
kotlinx-coroutines-core = "1.4.3"
material = "1.9.0"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", 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-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "androidx-fragment" }
androidx-lifecycle-common = { group = "androidx.lifecycle", name = "lifecycle-common-java8", version.ref = "androidx-lifecycle" }
androidx-lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
androidx-preference-ktx = { group = "androidx.preference", name = "preference-ktx", version.ref = "androidx-preference" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }

[plugins]
application = { id = "com.android.application", version.ref = "android" }
kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }

[bundles]

0 comments on commit dd74b9b

Please sign in to comment.