forked from hashgraph/hedera-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
90 lines (73 loc) · 2.32 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
plugins {
id "net.ltgt.errorprone" version "2.0.2" apply false
// Gradle plugin to discover dependency updates
// <https://github.com/ben-manes/gradle-versions-plugin>
id "com.github.ben-manes.versions" version "0.39.0"
id "jacoco"
id "org.sonarqube" version "3.3"
}
allprojects {
apply plugin: "java"
apply plugin: "net.ltgt.errorprone"
sourceCompatibility = 14
targetCompatibility = 14
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
// https://github.com/google/error-prone
// https://errorprone.info/
errorprone "com.google.errorprone:error_prone_core:2.8.1"
// https://github.com/uber/NullAway
errorprone "com.uber.nullaway:nullaway:0.8.0"
// https://github.com/grpc/grpc-java-api-checker
errorprone "io.grpc:grpc-java-api-checker:1.1.0"
// https://github.com/eclipse-ee4j/common-annotations-api
implementation "jakarta.annotation:jakarta.annotation-api:2.0.0"
}
jacoco {
reportsDir = file("$buildDir/jacoco")
toolVersion = "0.8.7"
}
sonarqube {
properties {
property "sonar.projectKey", "hashgraph_hedera-sdk-java"
property "sonar.organization", "hashgraph"
property "sonar.host.url", "https://sonarcloud.io"
}
}
tasks.withType(Test) {
apply plugin: "jacoco"
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.errorprone {
// https://github.com/uber/NullAway
warn("NullAway")
option("NullAway:AnnotatedPackages", "com.hedera.hashgraph.sdk")
option("NullAway:TreatGeneratedAsUnannotated", "true")
// https://github.com/grpc/grpc-java-api-checker
warn("GrpcExperimentalApi")
warn("GrpcInternal")
// Enable _all_ error prone checks then selectively disble
// Checks that are default-disabled are enabled as warnings
allDisabledChecksAsWarnings = true
disable("TryFailRefactoring")
disable("ThrowSpecificExceptions")
disable("FutureReturnValueIgnored")
disable("FieldCanBeFinal")
disable("Finally")
disable("BooleanParameter")
disable("ThreadJoinLoop")
disable("UnnecessaryDefaultInEnumSwitch")
disable("UngroupedOverloads")
// Uncomment do disable Android + JDK7 checks
// disable("Java7ApiChecker")
// disable("AndroidJdkLibsChecker")
// Ignore generated and protobuf code
disableWarningsInGeneratedCode = true
excludedPaths = ".*generated.*"
}
}
}