Skip to content

Commit

Permalink
Use version catalog in sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Chelombitko committed Aug 2, 2024
1 parent 325859c commit ae7b2a1
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 47 deletions.
15 changes: 8 additions & 7 deletions sample/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.badoo.marathon")
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.marathon)
}

android {
Expand Down Expand Up @@ -33,8 +33,9 @@ android {
}

dependencies {
implementation(Libraries.appCompat)
implementation(Libraries.constraintLayout)
androidTestImplementation(TestLibraries.androidxTestRunner)
androidTestImplementation(TestLibraries.androidxTestJUnit)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraintlayout)

androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation(libs.androidx.test.junit)
}
8 changes: 4 additions & 4 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("com.android.application") apply false
id("com.android.library") apply false
id("org.jetbrains.kotlin.android") apply false
id("com.badoo.marathon")
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.marathon)
}
7 changes: 0 additions & 7 deletions sample/buildSrc/build.gradle.kts

This file was deleted.

16 changes: 0 additions & 16 deletions sample/buildSrc/src/main/kotlin/Versions.kt

This file was deleted.

19 changes: 19 additions & 0 deletions sample/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[versions]
android-gradle-plugin = "8.5.1"
androidx-appcompat = "1.7.0"
androidx-constraintlayout = "2.1.4"
androidx-test = "1.6.1"
androidx-test-junit = "1.2.1"
kotlin-gradle-plugin = "1.9.24"

[libraries]
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraintlayout" }
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test" }
androidx-test-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-test-junit" }

[plugins]
android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
android-library = { id = "com.android.library", version.ref = "android-gradle-plugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin-gradle-plugin" }
marathon = { id = "com.badoo.marathon" }
15 changes: 8 additions & 7 deletions sample/library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("com.badoo.marathon")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.marathon)
}

android {
Expand Down Expand Up @@ -29,8 +29,9 @@ android {
}

dependencies {
implementation(Libraries.appCompat)
implementation(Libraries.constraintLayout)
androidTestImplementation(TestLibraries.androidxTestRunner)
androidTestImplementation(TestLibraries.androidxTestJUnit)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraintlayout)

androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation(libs.androidx.test.junit)
}
6 changes: 0 additions & 6 deletions sample/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ pluginManagement {
google()
maven { url "https://jitpack.io" }
}
plugins {
id "com.android.application" version "$androidPluginVersion"
id "com.android.library" version "$androidPluginVersion"
id "org.jetbrains.kotlin.android" version "$kotlinVersion"
}

includeBuild("..")
}

Expand Down

0 comments on commit ae7b2a1

Please sign in to comment.