Skip to content

Commit

Permalink
Merge pull request #157 from embulk/gradle-version-catalog
Browse files Browse the repository at this point in the history
Start using Gradle's version catalog
  • Loading branch information
dmikurube authored Apr 10, 2024
2 parents 1d0be18 + 879f558 commit d443d03
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ version = "0.7.0-SNAPSHOT"
description = "A Gradle plugin to build and publish Embulk plugins"

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
options.encoding = "UTF-8"
}

java {
Expand All @@ -32,8 +32,9 @@ dependencies {
implementation gradleApi()

testImplementation gradleTestKit()
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.1"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.1"
testImplementation platform(libs.junit5.bom)
testImplementation libs.bundles.junit5.implementation
testRuntimeOnly libs.bundles.junit5.runtime
}

jar {
Expand All @@ -60,13 +61,13 @@ gradlePlugin {
test {
useJUnitPlatform()
testLogging {
outputs.upToDateWhen { false }
events "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
showCauses = true
showExceptions = true
showStackTraces = true
showStandardStreams = true
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen { false }
}
}

Expand Down
19 changes: 19 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[versions]
junit5 = "5.10.2"

[libraries]
junit5-bom = { group = "org.junit", name = "junit-bom", version.ref = "junit5" }
junit5-api = { group = "org.junit.jupiter", name = "junit-jupiter-api" }
junit5-params = { group = "org.junit.jupiter", name = "junit-jupiter-params" }
junit5-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine" }

[bundles]

junit5-implementation = [
"junit5-api",
"junit5-params",
]

junit5-runtime = [
"junit5-engine",
]
4 changes: 4 additions & 0 deletions settings-gradle.lockfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
empty=incomingCatalogForLibs0

0 comments on commit d443d03

Please sign in to comment.