-
Notifications
You must be signed in to change notification settings - Fork 6
/
common.gradle
36 lines (31 loc) · 1.28 KB
/
common.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
// Gradle settings and tasks common to all Heart subprojects
apply plugin: 'checkstyle' // to analyze Java sourcecode for style violations
apply plugin: 'java' // to compile and test Java projects
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
checkstyle {
toolVersion = libs.versions.checkstyle.get()
}
tasks.withType(JavaCompile).configureEach { // Java compile-time options:
options.compilerArgs << '-Xdiags:verbose'
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_20)) {
// Suppress warnings that source value 8 is obsolete.
options.compilerArgs << '-Xlint:-options'
}
options.compilerArgs << '-Xlint:unchecked'
//options.deprecation = true // to provide detailed deprecation warnings
options.encoding = 'UTF-8'
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_1_10)) {
options.release = 8
}
}
tasks.withType(JavaExec).configureEach { // Java runtime options:
//args '--verbose' // to enable additional log output
classpath sourceSets.main.runtimeClasspath
enableAssertions = true
//jvmArgs '-verbose:gc'
//jvmArgs '-Xms512m', '-Xmx512m' // to enlarge the Java heap
//jvmArgs '-XX:+UseG1GC', '-XX:MaxGCPauseMillis=10'
}