Skip to content

Commit

Permalink
build: introduce version catalog
Browse files Browse the repository at this point in the history
Signed-off-by: Kengo TODA <[email protected]>
  • Loading branch information
KengoTODA committed Dec 30, 2022
1 parent cd5ee67 commit bf6a36a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
10 changes: 4 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ plugins {

group = "jp.skypencil.errorprone.slf4j"

val errorproneVersion = "2.16"

dependencies {
compileOnly("com.google.errorprone:error_prone_check_api:$errorproneVersion")
errorprone("com.google.errorprone:error_prone_core:$errorproneVersion")
testImplementation("com.google.errorprone:error_prone_check_api:$errorproneVersion")
testImplementation("com.google.errorprone:error_prone_test_helpers:$errorproneVersion")
compileOnly(libs.errorprone.check.api)
errorprone(libs.errorprone.core)
testImplementation(libs.errorprone.check.api)
testImplementation(libs.errorprone.test.helpers)
}

val exportsArgs = listOf(
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
`kotlin-dsl`
id("com.diffplug.spotless") version "6.11.0"
alias(libs.plugins.spotless)
}

repositories {
Expand All @@ -9,7 +9,7 @@ repositories {
}

dependencies {
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.12.0")
implementation("com.diffplug.spotless:spotless-plugin-gradle:${libs.plugins.spotless.get().version}")
implementation("io.github.gradle-nexus:publish-plugin:1.1.0")
implementation("net.ltgt.gradle:gradle-errorprone-plugin:3.0.1")
implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.4.0.2513")
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
10 changes: 10 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[versions]
errorprone = "2.16"

[libraries]
errorprone-check-api = { module = "com.google.errorprone:error_prone_check_api", version.ref = "errorprone" }
errorprone-core = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" }
errorprone-test-helpers = { module = "com.google.errorprone:error_prone_test_helpers", version.ref = "errorprone" }

[plugins]
spotless = { id = "com.diffplug.spotless", version = "6.12.0" }

0 comments on commit bf6a36a

Please sign in to comment.