-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
121 lines (101 loc) · 4.12 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
121 lines (101 loc) · 4.12 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import net.ltgt.gradle.errorprone.errorprone
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
idea
java
id("io.quarkus").apply(false)
alias(libs.plugins.axionReleasePlugin)
alias(libs.plugins.errorPronePlugin)
alias(libs.plugins.jooqPlugin).apply(false)
}
description = "AboutBits PostgreSQL Operator"
scmVersion {
checks {
aheadOfRemote = true
snapshotDependencies = false
uncommittedChanges = false
}
releaseBranchNames = setOf("main")
releaseOnlyOnReleaseBranches = true
versionCreator("simple")
}
version = scmVersion.version
allprojects {
group = "it.aboutbits.postgresql"
version = rootProject.version
}
subprojects {
apply(plugin = "java")
apply(plugin = rootProject.libs.plugins.errorPronePlugin.get().pluginId)
java {
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
toolchain {
languageVersion = JavaLanguageVersion.of(JavaVersion.VERSION_25.majorVersion)
vendor = JvmVendorSpec.AMAZON
}
}
val quarkusPlatformGroupId: String by rootProject
val quarkusPlatformArtifactId: String by rootProject
val quarkusPlatformVersion: String by rootProject
dependencies {
/**
* Quarkus
*/
// https://mvnrepository.com/artifact/io.quarkus.platform/quarkus-bom
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
// https://mvnrepository.com/artifact/io.quarkus.platform/quarkus-operator-sdk-bom
implementation(enforcedPlatform("${quarkusPlatformGroupId}:quarkus-operator-sdk-bom:${quarkusPlatformVersion}"))
/**
* NullAway
*/
errorprone(rootProject.libs.errorProne)
errorprone(rootProject.libs.nullAway)
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
// Source code: A category that an Error Prone check already owns is deliberately absent
options.compilerArgs.add("-Xlint:deprecation,removal,unchecked,cast,rawtypes,divzero,this-escape,identity,text-blocks,dangling-doc-comments,restricted")
// The build itself: command-line options, path entries, output file collisions
options.compilerArgs.add("-Xlint:options,path,output-file-clash")
// Javadoc comments: the groups add checks Error Prone lacks, and `missing` floods on generated code
options.compilerArgs.add("-Xdoclint:all,-missing")
options.errorprone {
// The checks live in errorprone.args, see https://github.com/tbroyer/gradle-errorprone-plugin#argument-files
argumentFiles.from(rootProject.layout.projectDirectory.file("errorprone.args"))
}
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
testLogging {
exceptionFormat = TestExceptionFormat.FULL
info {
showStandardStreams = !providers.environmentVariable("CI").isPresent
events(
*listOfNotNull(
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.FAILED,
TestLogEvent.STANDARD_ERROR,
if (!providers.environmentVariable("CI").isPresent) TestLogEvent.STANDARD_OUT else null
).toTypedArray()
)
}
}
if (!project.hasProperty("createTestReports")) {
reports.html.required = false
reports.junitXml.required = false
}
filter {
if (project.hasProperty("excludeTests")) {
val excludePatterns = project.property("excludeTests").toString().split(",")
excludePatterns.forEach { pattern ->
excludeTestsMatching(pattern.trim())
}
}
}
}
}