forked from hyperledger-web3j/web3j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (96 loc) · 3.51 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
plugins {
id 'java'
id 'idea'
id 'org.sonarqube' version '3.4.0.2513'
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.1'
}
ext {
bouncycastleVersion = '1.73'
jacksonVersion = '2.14.2'
javaPoetVersion = '1.7.0'
kotlinVersion = '1.3.72'
kotlinPoetVersion = '1.5.0'
jnr_unixsocketVersion = '0.38.17'
okhttpVersion = '4.9.0'
rxjavaVersion = '2.2.2'
slf4jVersion = '2.0.11'
javaWebSocketVersion = '1.5.3'
picocliVersion = '3.0.0'
ensAdraffyVersion = '0.1.2'
kzg4844Version = '0.8.0'
tuweniVersion = '2.4.2'
// test dependencies
equalsverifierVersion = '3.14.1'
junitVersion = '5.5.2'
web3jUnitVersion = '4.11.0'
junitBenchmarkVersion = '0.7.2'
logbackVersion = '1.4.14'
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()
}
repositories {
maven { url "https://artifacts.consensys.net/public/maven/maven/" }
}
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
testImplementation "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"
}
tasks.named("spotlessJava").configure { dependsOn("spotlessGroovyGradle") }
tasks.named("spotlessKotlin").configure { dependsOn("spotlessJava", "spotlessGroovyGradle") }