-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
50 lines (41 loc) · 1.69 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
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
compileJava {
//fix for the absent error messages
//https://stackoverflow.com/questions/43277097/how-to-show-full-compile-error-messages-info-in-checker-framework-with-line-numb#
System.setProperty("line.separator", "\n")
doFirst {
options.compilerArgs = [
'-processor', 'org.checkerframework.checker.nullness.NullnessChecker,lombok.launch.AnnotationProcessorHider$AnnotationProcessor',
'-Xmaxerrs', '100',
'-Xmaxwarns', '100',
'-Awarns', // -Awarns turns Checker Framework errors into warnings
// '-AcheckPurityAnnotations',
'-Alint=redundantNullComparison',
// '-AprintVerboseGenerics',
// '-Afilenames',
'-processorpath', "${configurations.processors.asPath}",
"-Xbootclasspath/p:${configurations.checkerFrameworkAnnotatedJDK.asPath}"
]
}
}
configurations {
processors {
description = 'Type Annotations processors'
}
checkerFrameworkAnnotatedJDK {
description = 'a copy of JDK classes with Checker Framework type qualifers inserted'
}
}
dependencies {
ext.checkerFrameworkVersion = '2.5.4'
checkerFrameworkAnnotatedJDK "org.checkerframework:jdk8:${checkerFrameworkVersion}"
processors "org.checkerframework:checker:${checkerFrameworkVersion}"
processors 'org.projectlombok:lombok:1.16.20'
compile "org.checkerframework:checker-qual:${checkerFrameworkVersion}"
compile 'org.projectlombok:lombok:1.16.20'
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
}