-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle
106 lines (92 loc) · 3.7 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 '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 'org.jetbrains.kotlin.jvm' version '1.9.24'
id 'de.undercouch.download' version '4.1.2'
}
description 'Web3j-unit extension'
ext {
web3jVersion = version
kotlinLoggingVersion = '3.0.5'
logbackVersion = '1.5.6'
mockitoKotlinVersion = '1.9.24'
testContainersVersion = '1.19.8'
besuPluginVersion = '24.1.1'
besuInternalVersion = '24.1.1'
besuInternalCryptoVersion = '23.1.3'
besuCryptoDepVersion = '0.8.3'
}
apply {
[
'jacoco',
'java',
'javadoc',
'repositories',
'publish',
'spotless',
'junit'
].each { buildScript ->
download {
src "https://raw.githubusercontent.com/hyperledger/web3j-build-tools/main/gradle/$buildScript/build.gradle"
dest "$rootDir/gradle/$buildScript/build.gradle"
overwrite false
quiet true
onlyIfModified true
}
from("$rootDir/gradle/$buildScript/build.gradle")
}
}
repositories {
maven { url "https://hyperledger.jfrog.io/artifactory/besu-maven/" }
maven { url "https://artifacts.consensys.net/public/maven/maven/" }
maven { url "https://splunk.jfrog.io/splunk/ext-releases-local" }
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "org.web3j:core:$web3jVersion"
implementation "org.web3j:web3j-evm:$web3jVersion"
implementation "org.testcontainers:testcontainers:$testContainersVersion"
implementation "io.github.microutils:kotlin-logging:$kotlinLoggingVersion"
implementation "ch.qos.logback:logback-classic:$logbackVersion"
implementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
implementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
implementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
implementation "org.hyperledger.besu:plugin-api:$besuPluginVersion"
implementation("org.hyperledger.besu.internal:besu:$besuInternalVersion") {
exclude group: 'org.web3j'
}
implementation("org.hyperledger.besu.internal:api:$besuInternalVersion") {
exclude group: 'org.web3j'
}
implementation "org.hyperledger.besu:evm:$besuPluginVersion"
implementation "org.hyperledger.besu.internal:config:$besuInternalVersion"
implementation "org.hyperledger.besu.internal:core:$besuInternalVersion"
implementation "org.hyperledger.besu.internal:crypto:$besuInternalCryptoVersion"
implementation "org.hyperledger.besu.internal:rlp:$besuInternalVersion"
implementation "org.hyperledger.besu.internal:kvstore:$besuInternalVersion"
implementation "org.hyperledger.besu.internal:metrics-core:$besuInternalVersion"
implementation "org.hyperledger.besu.internal:trie:$besuInternalVersion"
implementation "org.hyperledger.besu.internal:util:$besuInternalVersion"
implementation "org.hyperledger.besu:bls12-381:$besuCryptoDepVersion"
implementation "org.hyperledger.besu:secp256k1:$besuCryptoDepVersion"
}
test {
useJUnitPlatform()
}
compileKotlin {
kotlinOptions {
jvmTarget = "17"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "17"
}
}
tasks.named("spotlessKotlin").configure { dependsOn("compileKotlin","spotlessJava", "spotlessGroovyGradle","processTestResources") }
tasks.named("spotlessJava").configure { dependsOn("compileTestJava","compileTestKotlin","compileKotlin","compileTestKotlin","spotlessGroovyGradle","processTestResources") }
tasks.named("test").configure { dependsOn("spotlessKotlin","spotlessJava") }