forked from hyperledger-web3j/web3j
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
96 lines (87 loc) · 3.09 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
plugins {
id 'java'
id 'idea'
id 'jacoco'
id 'com.diffplug.gradle.spotless' version '4.5.1'
id 'io.codearte.nexus-staging' version '0.22.0'
id 'de.marcphilipp.nexus-publish' version '0.4.0'
id 'de.undercouch.download' version '4.1.1'
id 'org.ajoberstar.git-publish' version '3.0.0'
}
ext {
bouncycastleVersion = '1.68'
jacksonVersion = '2.10.0'
javaPoetVersion = '1.7.0'
kotlinVersion = '1.3.72'
kotlinPoetVersion = '1.5.0'
jnr_unixsocketVersion = '0.21'
okhttpVersion = '4.9.0'
rxjavaVersion = '2.2.2'
slf4jVersion = '1.7.30'
javaWebSocketVersion = '1.3.8'
picocliVersion = '3.0.0'
web3jUnitVersion = version
// test dependencies
equalsverifierVersion = '3.5.5'
junitVersion = '5.5.2'
junitBenchmarkVersion = '0.7.2'
logbackVersion = '1.2.3'
mockitoJunitVersion = '3.1.0'
junitPlatformLauncherVersion = '1.5.2'
}
description 'Web3j base project.'
[
'jacoco',
'java',
'javadoc',
'publish',
'repositories',
'spotless'
].each { buildScript ->
download {
src "https://raw.githubusercontent.com/web3j/build-tools/master/gradle/$buildScript/build.gradle"
dest "$rootDir/gradle/$buildScript/build.gradle"
overwrite false
quiet true
onlyIfModified true
}
}
allprojects {
apply {
[
'java',
'javadoc',
'repositories',
'spotless'
].each { buildScript ->
from("$rootDir/gradle/$buildScript/build.gradle")
}
}
tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
useJUnitPlatform()
}
dependencies {
testCompile "org.junit.jupiter:junit-jupiter:$junitVersion"
testCompile "org.mockito:mockito-junit-jupiter:$mockitoJunitVersion"
configurations.all {
resolutionStrategy {
force(group: "org.jetbrains.kotlin", name: "kotlin-reflect", version: kotlinVersion)
force(group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: kotlinVersion)
force(group: "org.jetbrains.kotlin", name: "kotlin-stdlib-common", version: kotlinVersion)
force(group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk7", version: kotlinVersion)
force(group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", version: kotlinVersion)
force(group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: jacksonVersion)
force(group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion)
force(group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: jacksonVersion)
force(group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion)
}
}
}
if (project.name != 'integration-tests' && project.name != 'web3j') {
apply from: "$rootDir/gradle/publish/build.gradle"
}
}
configure(subprojects.findAll { it.name != 'integration-tests' }) {
apply from: "$rootDir/gradle/jacoco/build.gradle"
}