-
Notifications
You must be signed in to change notification settings - Fork 418
/
build.gradle
50 lines (41 loc) · 1.77 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
plugins {
id 'java'
}
group 'info.picocli'
description 'Picocli Codegen Tests for Java 9+: Tests Annotation Processors for picocli Annotations.'
version "$projectVersion"
// since the tests need JVM arg --add-opens, this subproject requires Java 9 or later
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
api rootProject
api project(':picocli-codegen')
testImplementation supportDependencies.compileTesting,
supportDependencies.log4j2api,
supportDependencies.log4j2core
if (org.gradle.api.JavaVersion.current().isJava8Compatible() && !org.gradle.api.JavaVersion.current().isJava9Compatible()) {
// only use tools.jar on Java 8, it was removed in Java 9 // https://github.com/google/compile-testing/issues/134
testImplementation files(org.gradle.internal.jvm.Jvm.current().getToolsJar()) // needed on Java 8: https://github.com/google/compile-testing/issues/102 (and #28)
}
}
test {
useJUnit()
jvmArgs('-XX:+IgnoreUnrecognizedVMOptions')
jvmArgs('--permit-illegal-access')
// https://github.com/google/compile-testing/issues/222
jvmArgs('--add-opens', 'jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED')
testLogging {
//showStandardStreams = true
}
}
jar {
manifest {
attributes 'Specification-Title': 'Picocli Codegen Tests for Java 9+',
'Specification-Vendor' : 'Remko Popma',
'Specification-Version' : archiveVersion.get(),
'Implementation-Title' : 'Picocli Codegen Tests for Java 9+',
'Implementation-Vendor' : 'Remko Popma',
'Implementation-Version': archiveVersion.get(),
'Automatic-Module-Name' : 'info.picocli.codegen.tests.java9plus'
}
}