-
Notifications
You must be signed in to change notification settings - Fork 350
/
build.gradle
38 lines (32 loc) · 1.03 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
///////////////////////////////////////////////////////////////////////////
/// Checker Framework pluggable type-checking and Error Prone example
///
plugins {
id 'java'
id 'net.ltgt.errorprone' version '2.0.2'
// Checker Framework pluggable type-checking
id 'org.checkerframework' version '0.6.11'
}
apply plugin: 'org.checkerframework'
dependencies {
// Must use at least version 2.4.0 of Error Prone.
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
errorprone 'com.google.errorprone:error_prone_core:2.10.0'
} else {
errorprone 'com.google.errorprone:error_prone_core:2.12.0'
}
}
repositories {
mavenCentral()
}
checkerFramework {
checkers = [
'org.checkerframework.checker.nullness.NullnessChecker',
]
}
compileJava {
// A checker will only run if Error Prone does not issue any warnings. So
// convert the expected error to a warning to test that both Error Prone
// and the Nullness Checker run.
options.errorprone.warn('CollectionIncompatibleType')
}