-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
197 lines (176 loc) · 7.61 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/*
* Copyright 2018 NEM
* Copyright 2019 ProximaX
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import io.netifi.flatbuffers.plugin.tasks.FlatBuffers
plugins {
// main language plugin
id 'java-library'
// distribution of library and dependencies
id 'java-library-distribution'
// publishing to maven repository
id 'maven-publish'
// support for integration tests
id "org.unbroken-dome.test-sets" version "3.0.1"
// sign the artifacts and pom
id 'signing'
// code coverage reporting
id 'jacoco'
// integrate coverage with github
id 'com.github.kt3k.coveralls' version '2.8.4'
// generator for the DTOs
id "org.openapi.generator" version "5.4.0"
// generate flat buffer files
id "io.netifi.flatbuffers" version "1.0.7"
}
flatbuffers {
flatcPath = './build/flatbuffers/flatc'
}
// define contents of the build
apply from: "$rootDir/gradle/content.gradle"
// load setup for coverage reports
apply from: "$rootDir/gradle/coverage.gradle"
// loak setup for publishing
apply from: "$rootDir/gradle/publishing.gradle"
// load Travis CI specific support
apply from: "$rootDir/gradle/travis.gradle"
// load support for openapi code generator
apply from: "$rootDir/gradle/openapi.gradle"
// load support for clone & build flatc
apply from: "$rootDir/gradle/flatbuffers.gradle"
// load support java
apply plugin: 'java'
// Java 11
sourceCompatibility = 11
// take dependencies from maven central
repositories {
mavenCentral()
}
// add generated code to the man sources et
sourceSets {
main {
java {
srcDirs += [ 'src/gen/java' ]
}
}
}
// testing details
test {
// use JUnit5
useJUnitPlatform()
}
// declare e2e test set
testSets {
e2e
}
// versions of dependencies
ext {
okHttp3Version = '4.9.3'
junitVersion = '5.6.0'
swagger_annotations_version = '1.6.5'
jackson_version = '2.13.2'
jackson_databind_version = '2.13.2'
jackson_databind_nullable_version = "0.2.2"
jakarta_annotation_version = '2.0.0'
spring_web_version = '5.3.16'
jodatime_version = "2.9.9"
junit_version = "4.13.1"
}
dependencies {
// ReactiveX async processing
api 'io.reactivex.rxjava3:rxjava:3.1.3'
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
// backport of java.time to support old android devices - removed from dependencies to avoid classpath polution
compileOnly 'org.threeten:threetenbp:1.5.1'
// crypto utilities, Hex
implementation('com.madgag.spongycastle:prov:1.58.0.0') {
// exclude junit as transitive dependency...
exclude group: 'junit'
}
// validations
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.apache.commons:commons-math3:3.6.1'
// sparse bitmap implementation
implementation 'com.googlecode.javaewah:JavaEWAH:1.1.13'
// serialization of transactions for server
implementation 'com.google.flatbuffers:flatbuffers-java:1.12.0'
// dependencies of DTO code generated by swagger
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'io.gsonfire:gson-fire:1.8.5'
implementation group: 'io.swagger.core.v3', name: 'swagger-annotations', version: '2.1.12'
implementation "com.squareup.okhttp3:okhttp:${okHttp3Version}"
implementation "com.squareup.okhttp3:logging-interceptor:${okHttp3Version}"
implementation group: 'io.nem', name: 'symbol-openapi-okhttp-gson-client', version: '1.0.3'
implementation group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '2.0.0'
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
implementation group: 'org.openapitools', name: 'jackson-databind-nullable', version: '0.2.2'
implementation group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.9.0'
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.13.2'
// spring
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation "org.springframework:spring-web:$spring_web_version"
implementation "org.springframework:spring-context:$spring_web_version"
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
implementation group: 'com.squareup.okio', name: 'okio', version: '1.0.0'
implementation group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.1.1'
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation 'org.glassfish.jersey.core:jersey-client:3.0.4'
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.0.4'
implementation 'org.glassfish.jersey.media:jersey-media-multipart:3.0.4'
implementation 'org.glassfish.jersey.media:jersey-media-json-jackson:3.0.4'
implementation 'org.glassfish.jersey.connectors:jersey-apache-connector:3.0.4'
implementation 'com.fasterxml.jackson.core:jackson-core:2.13.2'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.13.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.2'
implementation "org.openapitools:jackson-databind-nullable:0.2.2"
implementation "com.brsanthu:migbase64:2.2"
implementation 'jakarta.annotation:jakarta.annotation-api:2.0.0'
testImplementation "junit:junit:4.13.2"
// file utils
testImplementation 'commons-io:commons-io:2.11.0'
// backport of java.time to support old android devices
testImplementation 'org.threeten:threetenbp:1.5.1'
testImplementation 'org.hamcrest:hamcrest-core:1.3'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
testImplementation 'org.mockito:mockito-all:1.9.5'
testImplementation 'com.googlecode.matrix-toolkits-java:mtj:1.0.1'
// Logging facade
testImplementation 'org.slf4j:slf4j-api:1.7.26'
// log implementation
testRuntimeOnly 'ch.qos.logback:logback-classic:1.2.3'
// Tests
testImplementation 'org.apiguardian:apiguardian-api:1.0.0'
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
}
task flatBuffersGenerate(type: FlatBuffers) {
inputDir = file("schemas/flatbuffers")
outputDir = file("src/gen/java")
language = 'java'
}
flatBuffersCloneRepository.finalizedBy tasks.flatBuffersRunCmake
flatBuffersRunCmake.finalizedBy tasks.flatBuffersRunMake
compileJava.dependsOn tasks.flatBuffersCloneRepository
compileJava.dependsOn tasks.flatBuffersGenerate
compileJava.dependsOn tasks.openApiGenerate
compileJava.dependsOn tasks.removeMetafiles