-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
51 lines (45 loc) · 1.46 KB
/
Copy pathbuild.gradle
File metadata and controls
51 lines (45 loc) · 1.46 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
plugins {
// see https://docs.gradle.org/current/userguide/application_plugin.html
id('application') // this includes the java & distribution plugins
}
group = 'com.geoffdoesstuff.java'
version = '0.1.0'
allprojects {
repositories {
mavenCentral()
}
}
test {
// needed for JUnit
useJUnitPlatform()
// execute tasks in parallel if possible
maxParallelForks = 3
testLogging {
// if there is an exception in the tests, display the stack trace
exceptionFormat = 'full'
// this is a useful addition to get information for tests that do not fail (passed and skipped)
events = [/*"passed",*/ 'skipped', 'failed']
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
// generate JavaDoc and put into a jar file
withJavadocJar()
// collect source code into a jar file
withSourcesJar()
}
jar {
manifest {
// information to put into MANIFEST.MF in the jar file, does not apply to JavaDoc or Sources Jar files
attributes('Main-Class': application.mainClass,
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Implementation-Vendor': 'Geoff Does Stuff')
}
}
tasks.withType(JavaCompile).configureEach {
options.deprecation = true // convenience property instead of adding '-Xlint:deprecation' via compilerArgs
options.compilerArgs += ['-Xlint:unchecked']
}