Skip to content

Commit

Permalink
Implement version catalog
Browse files Browse the repository at this point in the history
Signed-off-by: Patryk Miś <[email protected]>
  • Loading branch information
PatrykMis committed Sep 29, 2023
1 parent f34856d commit d625b0e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 16 deletions.
14 changes: 7 additions & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,17 @@ android {
}

dependencies {
implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
implementation("com.jakewharton.timber:timber:5.0.1")
implementation(libs.androidx.appcompat)
implementation(libs.androidx.core.ktx)
implementation(libs.material)
implementation(libs.timber)

// Unit test
testImplementation("junit:junit:4.13.2")
testImplementation(libs.junit)

// Instrumented test
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.androidx.test.espresso)
}

// tasks
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
*/

plugins {
id("com.android.application") version "8.1.2" apply false
id("org.jetbrains.kotlin.android") version "1.9.10" apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
}
29 changes: 29 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[versions]
agp = "8.1.2"
androidx-appcompat = "1.6.1"
androidx-constraintlayout = "2.1.4"
androidx-core = "1.10.1"
androidx-test-espresso = "3.5.1"
androidx-test-junit = "1.1.5"
kotlin = "1.9.10"
material = "1.9.0"
test-junit = "4.13.2"
timber = "5.0.1"

[libraries]
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" }
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" }
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
timber = { group = "com.jakewharton.timber", name = "timber", version.ref = "timber" }

# Android test
androidx-test-espresso = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-test-espresso" }
androidx-test-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-junit" }

# Test
junit = { group = "junit", name = "junit", version.ref = "test-junit" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
14 changes: 7 additions & 7 deletions test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ android {
}

dependencies {
implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.core.ktx)
implementation(libs.material)

// Unit test
testImplementation("junit:junit:4.13.2")
testImplementation(libs.junit)

// Instrumented test
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.androidx.test.espresso)
}

0 comments on commit d625b0e

Please sign in to comment.