forked from resilience4j/resilience4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
139 lines (120 loc) · 4.12 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'net.saliman:gradle-cobertura-plugin:2.3.2'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.7.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'me.champeau.gradle:jmh-gradle-plugin:0.3.1'
classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.3"
classpath "org.ajoberstar:gradle-git:1.3.2"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.4.17"
classpath 'com.github.erizo.gradle:jcstress-gradle-plugin:0.8.0'
}
}
apply plugin: 'idea'
apply plugin: 'com.github.kt3k.coveralls'
apply from: "${rootDir}/libraries.gradle"
ext {
releaseVersion = '0.13.1'
}
allprojects {
apply plugin: 'net.saliman.cobertura'
apply plugin: 'me.champeau.gradle.jmh'
apply plugin: 'com.jfrog.artifactory'
version = '0.13.2'
group = 'io.github.resilience4j'
description = 'Resilience4j is a lightweight, easy-to-use fault tolerance library designed for Java8 and functional programming'
repositories {
jcenter()
mavenCentral()
}
}
artifactoryPublish.skip=true // apply to all projects except the root
ext {
coreProjects = subprojects.findAll {
p -> !p.name.contains("documentation") && !p.name.endsWith("-bom")
}
}
configure(project.coreProjects) {
apply plugin: 'java'
apply plugin: 'osgi'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply from: "${rootDir}/publishing.gradle"
dependencies {
compile ( libraries.vavr)
compile ( libraries.slf4j)
testCompile ( libraries.junit)
testCompile ( libraries.assertj)
testCompile ( libraries.logback)
testCompile ( libraries.mockito)
testCompile ( libraries.powermock)
testCompile ( libraries.powermock_api_mockito)
testCompile ( libraries.powermock_module_junit4)
testCompile ( libraries.awaitility)
jmh "org.openjdk.jmh:jmh-core:1.18"
jmh "org.openjdk.jmh:jmh-generator-annprocess:1.18"
}
tasks.withType(JavaCompile) {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.deprecation = true
options.encoding = 'UTF-8'
options.compilerArgs += ["-Xlint:unchecked", "-parameters"]
}
cobertura {
coverageIgnoreTrivial = true
coverageExcludes = ['.*io.github.resilience4j.bulkhead.internal.*']
}
jmh {
duplicateClassesStrategy = 'warn'
jmhVersion = '1.17'
}
}
def files = subprojects.collect { new File(it.projectDir, '/build/cobertura/cobertura.ser') }
cobertura {
coverageFormats = ['html', 'xml']
coverageSourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
coverageMergeDatafiles = files
}
test {
dependsOn(subprojects.test) // required by cobertura to aggregate report
}
tasks.coveralls {
dependsOn 'check'
}
task wrapper(type: Wrapper) {
gradleVersion = '3.2'
}
artifactory {
contextUrl = 'https://oss.jfrog.org'
resolve {
repository {
repoKey = 'libs-release'
maven = true
}
}
publish {
repository {
repoKey = 'oss-snapshot-local' //The Artifactory repository key to publish to
//when using oss.jfrog.org the credentials are from Bintray. For local build we expect them to be found in
//~/.gradle/gradle.properties, otherwise to be set in the build server
username = project.hasProperty('bintrayUsername') ? project.bintrayUsername : System.getenv('BINTRAY_USER')
password = project.hasProperty('bintrayApiKey') ? project.bintrayApiKey : System.getenv('BINTRAY_KEY')
}
defaults {
publications('mavenJava')
}
}
if (System.properties['https.proxyHost']) {
clientConfig.proxy.host = System.properties['https.proxyHost']
clientConfig.proxy.port = System.properties['https.proxyPort'].toInteger()
}
}