-
Notifications
You must be signed in to change notification settings - Fork 80
/
build.gradle
96 lines (78 loc) · 3.07 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
import org.gradle.util.GradleVersion
import static java.lang.Integer.parseInt
plugins {
id 'java-gradle-plugin'
id 'com.gradle.plugin-publish' version '1.3.0'
id 'org.nosphere.gradle.github.actions' version '1.4.0'
id 'groovy'
}
group = 'nu.studer'
version = '9.0.1-DEV'
configurations.all { Configuration c ->
c.resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'jakarta.xml.bind' && details.requested.name == 'jakarta.xml.bind-api') {
details.useVersion '3.0.1'
}
}
}
repositories {
mavenCentral()
}
dependencies {
api 'org.jooq:jooq-codegen:3.19.15'
runtimeOnly 'org.glassfish.jaxb:jaxb-core:3.0.2'
runtimeOnly 'org.glassfish.jaxb:jaxb-runtime:3.0.2'
testImplementation 'com.h2database:h2:2.3.232'
testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
vendor = JvmVendorSpec.BELLSOFT
}
}
tasks.withType(AbstractCompile).configureEach {
options.compilerArgs <<
"-Werror" <<
"-Xlint:all"
}
def dvBuildScan = develocity.buildScan
tasks.withType(Test).configureEach {
maxParallelForks = 1 // there is currently only a single test class
useJUnitPlatform()
String testJavaRuntimeVersion = findProperty('testJavaRuntimeVersion') ?: '17'
String testGradleVersion = findProperty('testGradleVersion') ?: GradleVersion.current().version
javaLauncher.set(javaToolchains.launcherFor { spec ->
spec.languageVersion.set(JavaLanguageVersion.of(testJavaRuntimeVersion))
dvBuildScan.value(identityPath.path + "#jvmVersion", testJavaRuntimeVersion)
} as Provider<? extends JavaLauncher>)
systemProperty 'testContext.gradleVersion', testGradleVersion
dvBuildScan.value(identityPath.path + "#gradleVersion", testGradleVersion)
def incompatibleJavaVsGradleVersions = parseInt(testJavaRuntimeVersion) > 20 && GradleVersion.version(testGradleVersion) < GradleVersion.version('8.6') ||
parseInt(testJavaRuntimeVersion) > 16 && GradleVersion.version(testGradleVersion) < GradleVersion.version('7.3') ||
parseInt(testJavaRuntimeVersion) > 15 && GradleVersion.version(testGradleVersion) < GradleVersion.version('7.0')
if (incompatibleJavaVsGradleVersions) {
enabled = false
}
}
tasks.withType(Javadoc).configureEach {
options.addStringOption('Xdoclint:none', '-quiet')
}
gradlePlugin {
website = 'https://github.com/etiennestuder/gradle-jooq-plugin'
vcsUrl = 'https://github.com/etiennestuder/gradle-jooq-plugin'
plugins {
pluginDevPlugin {
id = 'nu.studer.jooq'
displayName = 'gradle-jooq-plugin'
description = 'Gradle plugin that integrates jOOQ.'
tags.set(['jooq'])
implementationClass = 'nu.studer.gradle.jooq.JooqPlugin'
}
}
}
tasks.withType(ValidatePlugins.class).configureEach {
failOnWarning = true
enableStricterValidation = true
}