-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
83 lines (68 loc) · 2.17 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
plugins {
id "com.github.johnrengelman.shadow" version "6.0.0" apply false
id "net.ltgt.errorprone" version "1.2.1" apply false
id "com.github.ben-manes.versions" version "0.29.0" apply false
id "com.google.protobuf" version "0.8.12" apply false
id "org.flywaydb.flyway" version "6.5.5" apply false
id "com.diffplug.spotless" version "5.8.2" apply false
id "nu.studer.jooq" version "5.0.1" apply false
}
allprojects {
apply plugin: "java"
apply plugin: "idea"
apply plugin: "net.ltgt.errorprone"
apply plugin: "com.github.ben-manes.versions"
apply plugin: "com.diffplug.spotless"
sourceCompatibility = 14
targetCompatibility = 14
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
dependencies {
errorprone "com.google.errorprone:error_prone_core:2.5.1"
compileOnly "com.google.errorprone:error_prone_annotations:2.5.1"
errorprone "com.uber.nullaway:nullaway:0.7.9"
compileOnly "jakarta.annotation:jakarta.annotation-api:2.0.0"
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.errorprone {
// https://github.com/uber/NullAway
warn("NullAway")
option("NullAway:AnnotatedPackages", "com.hedera.hashgraph.seven_twenty_one")
option("NullAway:TreatGeneratedAsUnannotated", "true")
// ignore generated and protobuf code
disableWarningsInGeneratedCode = true
excludedPaths = "(.*proto.*)|(.*generated.*)|(.*db.*)"
}
}
spotless {
java {
importOrder()
removeUnusedImports()
prettier(['prettier': '2.2.0', 'prettier-plugin-java': '1.0.0']).config(['parser': 'java', 'tabWidth': 4])
targetExclude fileTree("${rootProject.projectDir}") {
// ignore proto/
include "proto/src/main/java/**/*.java"
// ignore .../db/
include "contract/src/main/java/com/hedera/hashgraph/seven_twenty_one/contract/db/**/*.java"
}
}
groovyGradle {
greclipse()
}
}
tasks.withType(Test) {
useJUnitPlatform()
// this task will fail on the first failed test
failFast = true
// emit logs per passed or failed test
testLogging {
exceptionFormat = 'full'
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
}