-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle
227 lines (197 loc) · 8.32 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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
/*
* This file is part of OpenTSDB.
* Copyright (C) 2021 Yahoo.
*
* 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 static com.bmuschko.gradle.docker.tasks.image.Dockerfile.Instruction;
plugins {
id 'application'
id 'maven-publish'
id "org.ajoberstar.reckon" version "0.13.0"
id "idea"
id "io.spring.dependency-management" version "1.0.8.RELEASE"
id "com.google.protobuf" version "0.8.15"
id 'com.bmuschko.docker-java-application' version '6.6.1'
id "org.ajoberstar.git-publish" version "3.0.1"
}
allprojects {
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
mavenLocal()
}
ext {
log4jVersion = '2.17.1'
slf4jVersion = '1.7.35'
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'signing'
archivesBaseName = rootProject.name + '-' + name
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
group = 'net.opentsdb.aura'
description = 'OpenTSDB Aura Libraries'
java {
withSourcesJar()
withJavadocJar()
}
publishing {
repositories {
maven {
def releaseRepo = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotRepo = "https://oss.sonatype.org/content/repositories/snapshots/"
afterEvaluate {
url = version.toString().endsWith('-SNAPSHOT') ? snapshotRepo : releaseRepo
}
credentials {
username = System.getenv('CI_DEPLOY_USERNAME') ? System.getenv('CI_DEPLOY_USERNAME') : "Unknown user"
password = System.getenv('CI_DEPLOY_PASSWORD') ? System.getenv('CI_DEPLOY_PASSWORD') : "Unknown password"
}
}
}
publications {
maven(MavenPublication) {
artifactId = archivesBaseName
from components.java
pom {
groupId = 'net.opentsdb.aura'
name = 'OpenTSDB Aura Storage Libraries'
description = 'OpenTSDB Aura Storage Libraries'
url = 'https://github.com/OpenTSDB/opentsdb-aura'
//from components.java
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
scm {
connection = 'scm:git:[email protected]:OpenTSDB/opentsdb-aura'
developerConnection = 'scm:git:[email protected]:OpenTSDB/opentsdb-aura'
url = 'https://github.com/OpenTSDB/opentsdb-aura/'
}
}
}
}
}
signing {
sign publishing.publications.maven
}
tasks.withType(Sign) {
onlyIf { !version.toString().endsWith('-SNAPSHOT') }
}
}
dependencies {
def opentsdbVersion = '3.0.90-SNAPSHOT'
def grpcVersion = '1.34.1'
implementation project(':core')
implementation project(':aerospike')
implementation project(':opentsdb')
implementation project(':aws')
implementation project(':meta-grpc-client')
implementation group: 'net.openhft', name: 'zero-allocation-hashing', version: '0.11'
implementation group: 'org.apache.lucene', name: 'lucene-core', version: '7.4.0'
implementation group: 'org.apache.lucene', name: 'lucene-analyzers-common', version: '7.4.0'
implementation group: 'org.apache.lucene', name: 'lucene-queryparser', version: '7.4.0'
implementation group: 'com.esotericsoftware', name: 'kryo', version: '4.0.0'
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.17'
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: log4jVersion
implementation(group: 'org.apache.kafka', name: 'kafka_2.9.2', version: '0.8.1.1') {
exclude group: 'log4j'
}
implementation group: 'net.opentsdb', name: 'opentsdb-core', version: opentsdbVersion
implementation group: 'net.opentsdb', name: 'opentsdb-executors-http', version: opentsdbVersion
implementation group: 'net.opentsdb', name: 'opentsdb-tracer-brave', version: opentsdbVersion
implementation(group: 'net.opentsdb', name: 'opentsdb-servlet', version: opentsdbVersion) {
exclude group: 'ch.qos.logback'
}
implementation(group: 'net.opentsdb', name: 'opentsdb-server-undertow', version: opentsdbVersion) {
exclude group: 'ch.qos.logback'
}
implementation group: 'net.opentsdb', name: 'opentsdb-http-config', version: opentsdbVersion
implementation(group: 'net.opentsdb', name: 'opentsdb-influx', version: opentsdbVersion) {
exclude group: 'ch.qos.logback'
}
implementation group: 'net.opentsdb', name: 'opentsdb-ultrabrew', version: opentsdbVersion
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.14.0'
implementation group: 'io.grpc', name: 'grpc-core', version: grpcVersion
implementation group: 'io.grpc', name: 'grpc-stub', version: grpcVersion
implementation group: 'io.grpc', name: 'grpc-protobuf', version: grpcVersion
implementation group: 'io.grpc', name: 'grpc-netty-shaded', version: grpcVersion
implementation group: 'io.undertow', name: 'undertow-core'
implementation group: 'io.undertow', name: 'undertow-servlet'
implementation group: 'org.glassfish.jersey.core', name: 'jersey-common', version: '3.0.2'
implementation group: 'org.glassfish.jersey.core', name: 'jersey-server', version: '3.0.2'
implementation group: 'org.glassfish.jersey.containers', name: 'jersey-container-servlet-core', version: '3.0.2'
implementation group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version: '3.0.2'
implementation group: 'org.glassfish.jersey.inject', name: 'jersey-hk2', version: '3.0.2'
implementation group: 'io.swagger', name: 'swagger-jersey2-jaxrs', version: '1.6.2'
testImplementation group: 'org.testng', name: 'testng', version: '6.14.3'
testImplementation group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
testImplementation group: 'com.jayway.restassured', name: 'rest-assured', version: '2.9.0'
testImplementation group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
testImplementation group: 'net.opentsdb', name: 'opentsdb-core', version: opentsdbVersion, classifier: 'tests'
testImplementation group: 'net.opentsdb', name: 'opentsdb-common', version: opentsdbVersion, classifier: 'tests'
testImplementation group: 'commons-io', name: 'commons-io', version: '2.5'
compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
archives group: 'org.apache.maven.wagon', name: 'wagon-ssh-external', version: '3.2.0'
}
group = 'net.opentsdb.aura'
ext['guava.version'] = '23.6.1-jre'
sourceSets {
main {
proto {
srcDir 'src/proto'
}
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.14.0"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:1.34.1"
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
test {
maxHeapSize = "6144m"
useTestNG() {
excludeGroups 'perf,async,experimental'
}
testLogging {
events "passed", "skipped", "failed"
}
}
reckon {
scopeFromProp()
snapshotFromProp()
}