-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
build.gradle
106 lines (93 loc) · 3.42 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
plugins {
id 'java'
id 'idea'
id 'org.sonarqube' version '5.0.0.4638'
id 'jacoco'
id 'com.diffplug.spotless' version '6.25.0'
id 'io.codearte.nexus-staging' version '0.30.0'
id 'de.marcphilipp.nexus-publish' version '0.4.0'
id 'de.undercouch.download' version '4.1.2'
id 'org.ajoberstar.git-publish' version '3.0.1'
}
ext {
bouncycastleVersion = '1.78.1'
jacksonVersion = '2.17.1'
javaPoetVersion = '1.13.0'
kotlinVersion = '1.9.24'
kotlinPoetVersion = '1.16.0'
jnr_unixsocketVersion = '0.38.22'
okhttpVersion = '4.12.0'
rxjavaVersion = '2.2.21'
slf4jVersion = '2.0.13'
javaWebSocketVersion = '1.5.6'
picocliVersion = '4.7.6'
ensAdraffyVersion = '0.2.0'
kzg4844Version = '1.0.0'
tuweniVersion = '2.4.2'
// test dependencies
equalsverifierVersion = '3.16.1'
junitVersion = '5.5.2'
web3jUnitVersion = '4.12.1'
junitBenchmarkVersion = '0.7.2'
logbackVersion = '1.5.6'
mockitoJunitVersion = '3.1.0'
junitPlatformLauncherVersion = '1.5.2'
}
description 'Web3j base project.'
[
'jacoco',
'java',
'javadoc',
'publish',
'repositories',
'spotless'
].each { buildScript ->
download {
src "https://github.com/raw/hyperledger/web3j-build-tools/main/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 {
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") }