forked from crate/crate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
136 lines (113 loc) · 5.62 KB
/
Copy pathbuild.gradle
File metadata and controls
136 lines (113 loc) · 5.62 KB
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
apply from: "$rootDir/gradle/javaModule.gradle"
archivesBaseName = 'crate-server'
configurations {
// export of test so that other modules can use the utilities there as well.
testOutput
}
dependencies {
compile project(':libs:dex')
compile project(':libs:es-x-content')
compile project(':libs:pgwire')
compile project(':libs:shared')
compile project(':libs:sql-parser')
compileOnly project(':libs:es-plugin-classloader')
testRuntime project(':libs:es-plugin-classloader')
compile "io.netty:netty-buffer:${versions.netty4}"
compile "io.netty:netty-codec-http:${versions.netty4}"
compile "io.netty:netty-codec:${versions.netty4}"
compile "io.netty:netty-common:${versions.netty4}"
compile "io.netty:netty-handler:${versions.netty4}"
compile "io.netty:netty-resolver:${versions.netty4}"
compile "io.netty:netty-transport-native-epoll:${versions.netty4}:linux-x86_64"
compile "io.netty:netty-transport:${versions.netty4}"
compile "org.apache.lucene:lucene-core:${versions.lucene}"
compile "org.apache.lucene:lucene-analyzers-common:${versions.lucene}"
compile "org.apache.lucene:lucene-backward-codecs:${versions.lucene}"
compile "org.apache.lucene:lucene-grouping:${versions.lucene}"
compile "org.apache.lucene:lucene-join:${versions.lucene}"
compile "org.apache.lucene:lucene-misc:${versions.lucene}"
compile "org.apache.lucene:lucene-queries:${versions.lucene}"
compile "org.apache.lucene:lucene-sandbox:${versions.lucene}"
compile "org.apache.lucene:lucene-spatial-extras:${versions.lucene}"
compile "org.apache.lucene:lucene-spatial3d:${versions.lucene}"
compile "org.apache.lucene:lucene-suggest:${versions.lucene}"
// lucene spatial
compile "org.locationtech.spatial4j:spatial4j:${versions.spatial4j}"
compile "org.locationtech.jts:jts-core:${versions.jts}"
compile "org.apache.logging.log4j:log4j-api:${versions.log4j2}"
compile "org.apache.logging.log4j:log4j-core:${versions.log4j2}"
compile("org.elasticsearch:elasticsearch-cli:${versions.elasticsearch}") {
exclude group: 'org.elasticsearch', module: 'elasticsearch-core'
}
compile "net.java.dev.jna:jna:${versions.jna}"
compile "com.tdunning:t-digest:3.2"
compile "org.hdrhistogram:HdrHistogram:2.1.9"
compile "com.carrotsearch:hppc:${versions.carrotsearch_hppc}"
compile "com.google.guava:guava:${versions.guava}"
compile "com.amazonaws:aws-java-sdk-s3:${versions.aws}"
compile "org.apache.commons:commons-math3:${versions.commonsmath}"
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-csv:${versions.jackson}"
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
// Needed by aws-java-sdk-s3 in Java 9
compile "javax.xml.bind:jaxb-api:${versions.jaxb_api}"
testCompile project(path: ':libs:dex', configuration: 'testOutput')
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "org.apache.lucene:lucene-codecs:${versions.lucene}"
testCompile "org.apache.lucene:lucene-test-framework:${versions.lucene}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}"
testCompile "org.mockito:mockito-core:${versions.mockito}"
testCompile "org.postgresql:postgresql:${versions.jdbc}"
testCompile 'com.pholser:junit-quickcheck-core:0.9'
testCompile 'com.pholser:junit-quickcheck-generators:0.9'
testCompile 'org.skyscreamer:jsonassert:1.3.0'
testCompile "junit:junit:${versions.junit}"
testCompile "org.junit.jupiter:junit-jupiter:${versions.junit5}"
testCompile ("org.junit.vintage:junit-vintage-engine") {
because 'allows JUnit 3 and JUnit 4 tests to run'
}
}
//noinspection GroovyAssignabilityCheck
task testOutputJar (type: Jar) {
classifier = 'server-testing'
from sourceSets.test.output
}
task getVersion(dependsOn: 'classes') {
doLast {
def stdout = new ByteArrayOutputStream()
javaexec {
if (System.getProperty('useSystemJdk') == null) {
executable = rootProject.jdks.runtime.getBinJavaPath()
}
classpath = sourceSets.main.runtimeClasspath
main = 'org.elasticsearch.Version'
standardOutput = stdout
}
ext.version = stdout.toString().trim().split(" ")[1].replace(',', '').trim()
ext.gitTag = "git describe".execute().text.trim()
ext.buildDate = new Date().format('yyyyMMddHHmm')
ext.buildShortHash = "git rev-parse --short HEAD".execute().text.trim()
if (gradle.taskGraph.hasTask(':app:release')) {
assert gitTag == version, "Version mismatch gitTag: " + gitTag + " does not match crate version: " + version
} else {
if (gradle.taskGraph.hasTask(':app:nightly')) {
ext.version = version.replace('-SNAPSHOT', '') + "-" + ext.buildDate + "-" + ext.buildShortHash
} else if (!gradle.taskGraph.hasTask(':app:uploadArchives')) {
ext.version = version + "-" + ext.buildShortHash
}
}
logger.quiet("gitTag: " + gitTag)
logger.quiet("version: " + version)
logger.quiet("buildDate: " + buildDate)
logger.quiet("buildShortHash: " + buildShortHash)
}
}
artifacts {
testOutput testOutputJar
}
test {
outputs.dir("$projectDir/data")
jacoco.excludes = ["*Test*"]
// make sure sources are first on classpath because we do override some class(es) (currently: lucene's AssertingLeafReader)
classpath = sourceSets.main.output + sourceSets.test.output + configurations.testCompile
}
clean.dependsOn('cleanTest')