This repository has been archived by the owner on Oct 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
build.gradle
183 lines (159 loc) · 6.03 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
def scalaMajorVersion = gradle.ext.scalaMajorVersion
def scalaMinorVersion = gradle.ext.scalaMinorVersion
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url "https://dl.bintray.com/ngbinh/maven"
}
}
dependencies {
classpath "org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_${gradle.ext.scalaMajorVersion}:1.0.1"
classpath "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.15.0"
}
}
subprojects {
apply plugin: "java"
apply plugin: "scala"
apply plugin: "maven"
apply plugin: "maven-publish"
apply plugin: "scalaStyle"
apply plugin: "com.github.hierynomus.license"
apply plugin: "signing"
group = "com.sumologic.elasticsearch"
description = "Elasticsearch Client for Scala that operates against the REST Endpoint"
version = '7.1.10-SNAPSHOT'
sourceCompatibility = javaSourceVersion
targetCompatibility = javaTargetVersion
repositories {
jcenter()
mavenCentral()
}
dependencies {
testCompile "org.scalatest:scalatest_${scalaMajorVersion}:${scalatestVersion}"
testCompile "junit:junit:${junitVersion}"
testCompile "org.mockito:mockito-core:${mockitoVersion}"
}
compileScala {
scalaCompileOptions.additionalParameters = [
"-feature",
"-target:jvm-1.8",
"-deprecation",
"-language:implicitConversions",
"-unchecked",
// TODO: (fdaca 2019-11-22) please consider repairing warnings and enabling this
//"-Xfatal-warnings"
]
}
test {
maxHeapSize = '2g'
testLogging {
events 'failed', 'passed', 'skipped'
showStandardStreams = true
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
ext.gitCommitIdAbbrev = System.getenv('GIT_COMMIT_ID_ABBREV') ?: 'git rev-parse --verify --short=12 HEAD'.execute().text.trim()
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from(sourceSets.main.allJava) {
expand(project: [version: project.version], git: [commit: [id: [abbrev: gitCommitIdAbbrev]]])
}
from(sourceSets.main.allScala)
}
task javadocJar(type: Jar, dependsOn: scaladoc) {
from javadoc
from scaladoc
archiveClassifier.set('javadoc')
}
license {
header rootProject.file('src/etc/header.txt')
strictCheck true
}
publishing {
publications {
maven(MavenPublication) {
groupId(project.group)
artifactId(project.name + "_${scalaMajorVersion}")
version(project.version)
pom {
name = project.name
description = project.description
url = 'https://github.com/SumoLogic/elasticsearch-client'
licenses {
license {
name = 'Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'CCheSumo'
name = 'Chuck Che'
organization = 'Sumo Logic'
}
}
scm {
connection = 'scm:git:[email protected]:SumoLogic/elasticsearch-client.git'
developerConnection = 'scm:git:[email protected]:SumoLogic/elasticsearch-client.git'
url = "https://github.com/SumoLogic/elasticsearch-client"
tag = 'HEAD'
}
}
from(components.java)
artifact(sourcesJar)
artifact(javadocJar)
}
}
repositories {
maven {
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username project.findProperty('nexus_username') ?: ""
password project.findProperty('nexus_password') ?: ""
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.maven
}
}
project(':elasticsearch-core') {
dependencies {
compile "org.json4s:json4s-jackson_${scalaMajorVersion}:${json4sVersion}"
compile "org.slf4j:slf4j-api:${slf4jVersion}"
compile "com.typesafe.akka:akka-actor_${scalaMajorVersion}:${akkaVersion}"
compile "com.typesafe.akka:akka-http_${scalaMajorVersion}:${akkaHttpVersion}"
compile "com.typesafe.akka:akka-stream_${scalaMajorVersion}:${akkaVersion}"
testCompile "org.apache.lucene:lucene-core:${luceneVersion}"
testCompile "org.apache.lucene:lucene-analyzers-common:${luceneVersion}"
testCompile "org.elasticsearch:elasticsearch:${elasticsearchVersion}"
}
}
project(':elasticsearch-akka') {
dependencies {
compile project(':elasticsearch-core')
compile "org.slf4j:slf4j-api:${slf4jVersion}"
compile "com.typesafe.akka:akka-actor_${scalaMajorVersion}:${akkaVersion}"
compile "com.typesafe.akka:akka-stream_${scalaMajorVersion}:${akkaVersion}"
testCompile "com.typesafe.akka:akka-testkit_${scalaMajorVersion}:${akkaVersion}"
}
}
project(':elasticsearch-aws') {
dependencies {
compile project(':elasticsearch-core')
compile "com.amazonaws:aws-java-sdk-core:${awsJavaSdkVersion}"
compile "org.slf4j:slf4j-api:${slf4jVersion}"
compile "com.typesafe.akka:akka-http_${scalaMajorVersion}:${akkaHttpVersion}"
compile "com.typesafe.akka:akka-stream_${scalaMajorVersion}:${akkaVersion}"
compile "com.typesafe.akka:akka-actor_${scalaMajorVersion}:${akkaVersion}"
}
}