-
Notifications
You must be signed in to change notification settings - Fork 435
/
Copy pathbuild.gradle
118 lines (89 loc) · 3.25 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import java.util.stream.Collector
import java.util.stream.Collectors
buildscript {
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/plugins-release' }
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://repo.spring.io/snapshot' }
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0"
classpath "de.marcphilipp.gradle:nexus-publish-plugin:0.4.0"
classpath "net.ltgt.gradle:gradle-errorprone-plugin:${gradleErrorPronePluginVersion}"
}
}
allprojects { pr ->
pr['signing.keyId'] = System.getenv('GPG_ID')
pr['signing.password'] = System.getenv('GPG_PASSWORD')
pr['signing.secretKeyRingFile'] = '/home/travis/.gnupg/secring.gpg'
}
apply plugin: 'idea'
apply plugin: 'jacoco'
apply from: "${rootDir}/publishSonatype.gradle"
allprojects {
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/release' }
maven { url "https://jitpack.io" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url 'https://repo.spring.io/snapshot' }
maven { url "https://repo.spring.io/milestone" }
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'net.ltgt.errorprone'
tasks.withType(JavaCompile, {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
})
tasks.withType(Test) {
//forkEvery = 1
testLogging {
exceptionFormat = 'full'
// showStandardStreams = true
}
}
dependencies {
["annotationProcessor", "testAnnotationProcessor", "compileOnly", "testCompileOnly"].each { conf ->
add(conf, "org.projectlombok:lombok:${lombokVersion}")
}
errorprone("com.google.errorprone:error_prone_core:${errorProneVersion}")
}
tasks.withType(JavaCompile).configureEach {
options.errorprone.disableWarningsInGeneratedCode = true
options.errorprone.enabled = false
// (it.name.startsWith("compile") && it.name.endsWith("TestJava") ) ? false:(null != System.getenv("CI"))
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
}
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
sourceSets(project('grpc-spring-boot-starter').sourceSets.main
, project('grpc-client-spring-boot-starter').sourceSets.main)
reports {
xml.required.set(true)
xml.getOutputLocation().set(getLayout().getBuildDirectory().file("reports/jacoco/report.xml"))
html.required.set(true)
csv.required.set(true)
}
dependsOn {
subprojects.stream().flatMap { p ->
p.getTasks()
.getAsMap()
.entrySet()
.stream()
.filter {[ "delombok","javadoc"].contains(it.key) || it.value instanceof Test }
.map {it.value}
}.collect(Collectors.toList())
}
}
subprojects {
tasks.withType(Test, { t ->
t.environment.put("TESTCONTAINERS_REUSE_ENABLE", "true")
})
}