forked from pytorch/serve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
80 lines (67 loc) · 1.86 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
buildscript {
ext {
spotbugsVersion = '4.0.2'
toolVersion = '4.0.2'
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.13'
}
}
plugins {
id 'com.google.protobuf' version '0.8.13' apply false
id 'idea'
id 'com.github.spotbugs' version '4.0.2' apply false
}
allprojects {
version = '1.0'
repositories {
jcenter()
}
apply plugin: 'idea'
idea {
module {
outputDir = file('build/classes/java/main')
testOutputDir = file('build/classes/java/test')
}
}
}
def javaProjects() {
return subprojects.findAll();
}
configure(javaProjects()) {
apply plugin: 'java-library'
sourceCompatibility = 1.8
targetCompatibility = 1.8
defaultTasks 'jar'
apply from: file("${rootProject.projectDir}/tools/gradle/formatter.gradle")
apply from: file("${rootProject.projectDir}/tools/gradle/check.gradle")
apply from: file("${rootProject.projectDir}/tools/gradle/spotbugs.gradle")
test {
useTestNG() {
suites 'testng.xml'
}
testLogging {
showStandardStreams = true
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
test.finalizedBy(project.tasks.jacocoTestReport)
compileJava {
options.compilerArgs << "-proc:none" << "-Xlint:all,-options,-static" << "-Werror"
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.70
}
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: "${rootProject.projectDir}/server/src/main/java",
exclude: ['org/pytorch/serve/grpc**/**'])
}))
}
}
}
}