• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2017. Uber Technologies
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *    http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16plugins {
17  id "java-library"
18  id "nullaway.jacoco-conventions"
19}
20
21sourceCompatibility = "1.8"
22targetCompatibility = "1.8"
23
24dependencies {
25     testImplementation deps.test.junit4
26     testImplementation(deps.build.errorProneTestHelpers) {
27        exclude group: "junit", module: "junit"
28    }
29     testImplementation project(":nullaway")
30     testImplementation project(":jar-infer:test-java-lib-jarinfer")
31
32}
33
34
35test {
36    maxHeapSize = "1024m"
37    if (!JavaVersion.current().java9Compatible) {
38        jvmArgs "-Xbootclasspath/p:${configurations.errorproneJavac.asPath}"
39    } else {
40        // to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer
41        jvmArgs += [
42                "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
43                "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
44                "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
45                "--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
46                "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
47                "--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED",
48                "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
49                "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
50                "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
51                "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
52        ]
53    }
54}
55