-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
101 lines (85 loc) · 2.87 KB
/
build.gradle
File metadata and controls
101 lines (85 loc) · 2.87 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
plugins {
id 'com.diffplug.spotless' version '7.0.2' apply false
id 'info.solidsoft.pitest' version '1.15.0' apply false
id 'com.vanniktech.maven.publish' version '0.30.0' apply false
}
allprojects {
group = property('group')
version = property('version')
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'com.vanniktech.maven.publish'
spotless {
java {
googleJavaFormat('1.19.2')
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
}
// Do not enforce spotlessCheck during build — existing code is not yet formatted.
// Contributors should run ./gradlew spotlessApply on modified files before committing.
afterEvaluate {
tasks.named('check').configure {
dependsOn.removeAll { dep ->
def depName = dep instanceof Task ? dep.name : dep.toString()
depName.contains('spotless')
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
options.addStringOption('Xdoclint:none', '-quiet')
}
dependencies {
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
tasks.named('test') {
useJUnitPlatform()
}
mavenPublishing {
publishToMavenCentral(com.vanniktech.maven.publish.SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
pom {
name = "QueryAudit - ${project.name}"
description = 'Automatic query performance analysis for JUnit tests'
url = 'https://github.com/haroya01/query-audit'
inceptionYear = '2025'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
id = 'haroya01'
name = 'QueryAudit Contributors'
url = 'https://github.com/haroya01/query-audit'
}
}
scm {
url = 'https://github.com/haroya01/query-audit'
connection = 'scm:git:git://github.com/haroya01/query-audit.git'
developerConnection = 'scm:git:ssh://git@github.com/haroya01/query-audit.git'
}
issueManagement {
system = 'GitHub Issues'
url = 'https://github.com/haroya01/query-audit/issues'
}
}
}
}