-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (91 loc) · 3.19 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
plugins {
id "java"
id "java-gradle-plugin"
id "checkstyle"
alias(libs.plugins.gradle.plugin.publish)
}
repositories {
mavenCentral()
}
// This Gradle plugin is published under the group "gradle.plugin.org.embulk".
// We have an option to avoid the "gradle.plugin" prefix, but we don't do it as it bothers the Gradle team.
// They want Gradle plugins to be published under the "gradle.plugin" prefix for some security reasons.
// https://plugins.gradle.org/docs/publish-plugin
group = "org.embulk"
version = "0.2.0-SNAPSHOT"
description = "A Gradle plugin to set up an environment for running Embulk"
configurations {
compileClasspath.resolutionStrategy.activateDependencyLocking()
runtimeClasspath.resolutionStrategy.activateDependencyLocking()
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
options.encoding = "UTF-8"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
dependencies {
implementation gradleApi()
testImplementation gradleTestKit()
testImplementation platform(libs.junit5.bom)
testImplementation libs.bundles.junit5.implementation
testRuntimeOnly libs.bundles.junit5.runtime
}
jar {
from rootProject.file("LICENSE")
}
// A safer and strict alternative to: "dependencies" (and "dependencies --write-locks")
//
// This task fails explicitly when the specified dependency is not available.
// In contrast, "dependencies (--write-locks)" does not fail even when a part the dependencies are unavailable.
//
// https://docs.gradle.org/8.7/userguide/dependency_locking.html#generating_and_updating_dependency_locks
task checkDependencies {
notCompatibleWithConfigurationCache("The task \"checkDependencies\" filters configurations at execution time.")
doLast {
configurations.findAll { it.canBeResolved }.each { it.resolve() }
}
}
gradlePlugin {
website = "https://www.embulk.org/"
vcsUrl = "https://github.com/embulk/gradle-embulk-runset"
plugins {
embulkPluginsPlugin {
id = "org.embulk.runset"
displayName = "A Gradle plugin to set up an environment for running Embulk"
description = "${project.description}"
implementationClass = "org.embulk.gradle.runset.EmbulkRunSetPlugin"
tags = ["embulk"]
}
}
}
test {
useJUnitPlatform()
testLogging {
outputs.upToDateWhen { false }
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
showCauses = true
showExceptions = true
showStackTraces = true
showStandardStreams = true
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
tasks.withType(Checkstyle) {
reports {
// Not to skip up-to-date checkstyles.
outputs.upToDateWhen { false }
}
}
checkstyle {
toolVersion = libs.versions.checkstyle.get()
configFile = file("${rootProject.projectDir}/config/checkstyle/checkstyle.xml")
configProperties = [
"org.checkstyle.google.suppressionfilter.config": file("${rootProject.projectDir}/config/checkstyle/checkstyle-suppressions.xml"),
]
ignoreFailures = false
maxWarnings = 0
}