Skip to content

Commit

Permalink
chore: inline buildSrc dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorhugods committed Apr 2, 2024
1 parent 14ccee9 commit 6f53ebe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
28 changes: 8 additions & 20 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@
* along with this program. If not, see http://www.gnu.org/licenses/.
*/

private object Dependencies {
val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.get()}"
val detektGradlePlugin = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${klibs.versions.detekt.get()}"
val koverGradlePlugin = "org.jetbrains.kotlinx:kover-gradle-plugin:${klibs.versions.kover.get()}"
val junit = "junit:junit:${libs.versions.junit4.get()}"
val kluent = "org.amshove.kluent:kluent:${libs.versions.kluent.get()}"
const val spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.1.2"
const val junit5 = "de.mannodermaus.gradle.plugins:android-junit5:1.9.3.0"
const val grgit = "org.ajoberstar.grgit:grgit-core:5.2.0"
const val javapoet = "com.squareup:javapoet:1.13.0"
}

plugins {
`kotlin-dsl`
`kotlin-dsl-precompiled-script-plugins`
Expand All @@ -44,13 +32,13 @@ repositories {
dependencies {
implementation("com.android.tools.build:gradle:${klibs.versions.agp.get()}")
implementation(libs.kotlin.gradlePlugin)
implementation(Dependencies.detektGradlePlugin)
implementation(Dependencies.koverGradlePlugin)
implementation(Dependencies.spotless)
implementation(Dependencies.junit5)
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${klibs.versions.detekt.get()}")
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:${klibs.versions.kover.get()}")
implementation(libs.spotless.gradlePlugin)
implementation(libs.android.junit5)

testImplementation(Dependencies.junit)
testImplementation(Dependencies.kluent)
implementation(Dependencies.grgit)
implementation(Dependencies.javapoet) // https://github.com/google/dagger/issues/3068
testImplementation("junit:junit:${libs.versions.junit4.get()}")
testImplementation("org.amshove.kluent:kluent:${libs.versions.kluent.get()}")
implementation(libs.grgit.core)
implementation(libs.squareup.javapoet) // https://github.com/google/dagger/issues/3068
}
8 changes: 8 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[versions]
# Gradle - Remind to change in `gradle-wrapper.properties` file as well!
androidJunit5 = "1.9.3.0"
gradle = "8.5"

# Kotlin
grgitCore = "5.2.0"
kotlin = "1.9.23"

# KotlinX
Expand All @@ -21,6 +23,8 @@ firebaseBOM = "32.7.3"
fragment = "1.5.6"
resaca = "2.4.6"
bundlizer = "0.7.0"
spotless = "6.1.2"
squareup-javapoet = "1.13.0"
visibilityModifiers = "1.1.0"

# AndroidX
Expand Down Expand Up @@ -112,12 +116,15 @@ wire-hilt = { id = "com.wire.android.hilt" }

[libraries]
# Kotlin Gradle Plugin
android-junit5 = { module = "de.mannodermaus.gradle.plugins:android-junit5", version.ref = "androidJunit5" }
grgit-core = { module = "org.ajoberstar.grgit:grgit-core", version.ref = "grgitCore" }
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "android-gradlePlugin" }
hilt-gradlePlugin = { module = "com.google.dagger:hilt-android-gradle-plugin", version.ref = "hilt" }
googleGms-gradlePlugin = { module = "com.google.gms:google-services", version.ref = "google-gms" }
googleGms-location = { module = "com.google.android.gms:play-services-location", version.ref = "gms-location" }
aboutLibraries-gradlePlugin = { module = "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin", version.ref = "aboutLibraries" }
spotless-gradlePlugin = { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "spotless" }

ktx-serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "ktx-serialization" }
ktx-dateTime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "ktx-dateTime" }
Expand All @@ -133,6 +140,7 @@ coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", ve

# Android Core / Architecture
android-desugarJdkLibs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugaring" }
squareup-javapoet = { module = "com.squareup:javapoet", version.ref = "squareup-javapoet" }
visibilityModifiers = { module = "io.github.esentsov:kotlin-visibility", version.ref = "visibilityModifiers" }
resaca-core = { module = "com.github.sebaslogen.resaca:resaca", version.ref = "resaca" }
resaca-hilt = { module = "com.github.sebaslogen.resaca:resacahilt", version.ref = "resaca" }
Expand Down

0 comments on commit 6f53ebe

Please sign in to comment.