This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
136 lines (115 loc) · 4.11 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
plugins {
id 'java'
id 'idea'
id 'jacoco'
id 'com.adarshr.test-logger' version '2.0.0'
id "com.diffplug.gradle.spotless" version '3.25.0'
id 'io.codearte.nexus-staging' version '0.21.1'
id "de.marcphilipp.nexus-publish" version '0.4.0'
id 'org.unbroken-dome.test-sets' version '2.1.1'
id 'org.jetbrains.kotlin.jvm' version '1.3.60'
id "de.undercouch.download" version '4.0.0'
id "com.jfrog.bintray" version '1.8.4'
}
apply from: "$rootDir/gradle/repositories/build.gradle"
repositories {
maven {
url "$rootProject.projectDir/lib"
}
}
description 'Integrates web3j with the Aion Network blockchain.'
ext {
loadPropsFromFile = { String path ->
def props = new Properties()
def propsFile = file(path)
if (propsFile.exists()) {
propsFile.withReader { reader ->
props.load(reader)
}
}
props
}
versions = loadPropsFromFile("$rootDir/versions.properties")
}
subprojects {
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'org.unbroken-dome.test-sets'
apply plugin: 'de.undercouch.download'
repositories {
maven {
url "$rootProject.projectDir/lib"
}
}
apply {
[
'bintray',
'jacoco',
'java',
'javadoc',
'repositories',
'publish',
'spotless',
].each { buildScript ->
download {
src "https://raw.githubusercontent.com/web3j/build-tools/master/gradle/$buildScript/build.gradle"
dest "$rootDir/gradle/$buildScript/build.gradle"
overwrite true
quiet true
onlyIfModified true
}
from("$rootDir/gradle/$buildScript/build.gradle")
}
}
publishing {
publications {
maven(MavenPublication) {
artifactId = "${rootProject.name}-$project.name"
}
}
}
testSets {
integrationTest {
dirName = 'integration-test'
}
}
tasks.withType(Test) {
useJUnitPlatform()
systemProperties = [
'junit.jupiter.extensions.autodetection.enabled': 'true',
'junit.jupiter.testinstance.lifecycle.default' : 'per_class'
]
}
configurations {
testOutput.extendsFrom(testCompile)
integrationTestOutput.extendsFrom(integrationTestCompile)
}
testlogger {
showStandardStreams true
}
dependencies {
api "org.bouncycastle:bcpkix-jdk15on:${versions.bouncycastle}"
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.jetbrains.kotlin:kotlin-noarg'
implementation 'org.jetbrains.kotlin:kotlin-native-utils'
implementation "io.github.microutils:kotlin-logging:${versions.kLogging}"
testImplementation(group: 'org.web3j', name: 'core', version: version, classifier: 'tests')
testImplementation "org.junit.jupiter:junit-jupiter-api:${versions.junit5}"
testImplementation "com.willowtreeapps.assertk:assertk-jvm:${versions.assertk}"
testImplementation("io.mockk:mockk:${versions.mockk}") {
exclude group: 'org.jetbrains.kotlin'
}
runtimeOnly "com.github.schnitker.logmanager:logmgr-logback:${versions.logmanager}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${versions.junit5}"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${versions.junit5}"
integrationTestImplementation "org.testcontainers:testcontainers:${versions.testcontainers}"
integrationTestImplementation "org.testcontainers:junit-jupiter:${versions.testcontainers}"
}
sourceCompatibility = JavaVersion.VERSION_1_8
compileKotlin.kotlinOptions.jvmTarget = sourceCompatibility
compileTestKotlin.kotlinOptions.jvmTarget = sourceCompatibility
compileIntegrationTestKotlin.kotlinOptions.jvmTarget = sourceCompatibility
}
bintrayUpload {
enabled = false
}