-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.gradle
118 lines (104 loc) · 4.63 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
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
classpath 'org.unbroken-dome.gradle-plugins:gradle-testsets-plugin:4.1.0'
}
}
plugins {
id 'de.undercouch.download' version '4.1.2'
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'
}
description = 'Web3j-OpenAPI code generation for Ethereum smart contracts.'
ext {
web3jVersion = version
}
subprojects {
apply plugin: "kotlin"
apply from: "$rootProject.projectDir/gradle/versions.gradle"
repositories {
mavenCentral()
maven { url "https://artifacts.consensys.net/public/maven/maven/" }
}
apply {
[
'publish',
'jacoco',
'java',
'javadoc',
'junit',
'repositories',
'spotless'
].each { buildScript ->
download {
src "https://raw.githubusercontent.com/hyperledger-web3j/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")
}
}
publishing {
publications {
maven(MavenPublication) {
pom {
scm {
url = "https://github.com/web3j/web3j-openapi"
connection = "scm:https://github.com/web3j/web3j-openapi.git"
developerConnection = "scm:git://github.com/web3j/web3j-openapi.git"
}
}
}
}
}
tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
useJUnitPlatform()
}
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "io.github.microutils:kotlin-logging:${versions.kotlinLogging}"
implementation "ch.qos.logback:logback-classic:${versions.logback}"
implementation "org.slf4j:slf4j-api:${versions.slf4j}"
implementation "org.slf4j:jul-to-slf4j:${versions.slf4j}"
testImplementation "com.willowtreeapps.assertk:assertk-jvm:${versions.assertk}"
testImplementation "org.mockito:mockito-junit-jupiter:${versions.mockitoJunit}"
configurations.all {
resolutionStrategy {
force(group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: versions.jackson)
force(group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: versions.jackson)
force(group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: versions.jackson)
force(group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: versions.jackson)
force(group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-joda', version: versions.jackson)
force(group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: versions.jackson)
force(group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: versions.jackson)
force(group: 'com.fasterxml.jackson.jaxrs', name: 'jackson-jaxrs-base', version: versions.jackson)
force(group: 'com.fasterxml.jackson.jaxrs', name: 'jackson-jaxrs-json-provider', version: versions.jackson)
force(group: 'io.github.microutils', name: 'kotlin-logging', version: versions.kotlinLogging)
force(group: 'io.swagger.core.v3', name: 'swagger-core', version: versions.swagger)
force(group: 'io.swagger.core.v3', name: 'swagger-models', version: versions.swagger)
force(group: 'io.swagger.core.v3', name: 'swagger-annotations', version: versions.swagger)
force(group: "org.jetbrains.kotlin", name: "kotlin-compiler-embeddable", version: kotlinVersion)
force(group: "org.jetbrains.kotlin", name: "kotlin-script-runtime", version: kotlinVersion)
}
}
}
compileKotlin {
kotlinOptions.jvmTarget = "17"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "17"
}
sourceCompatibility = 17
tasks.named("spotlessJava") {
dependsOn(tasks.named("spotlessGroovyGradle"))
}
}