-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle
81 lines (63 loc) · 2.43 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.elasticsearch.gradle:build-tools:${elastic_version}"
}
}
repositories {
mavenCentral()
mavenLocal()
maven {
url "https://repo1.maven.org/maven2"
}
}
group = 'org.elasticsearch.plugin'
version = "${plugin_version}"
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'elasticsearch.esplugin'
apply plugin: 'elasticsearch.yaml-rest-test'
esplugin {
name 'elasticsearch-plugin-geoshape'
description 'Add extra geo capabilities to default elastic geo_shape data type.'
classname 'org.opendatasoft.elasticsearch.plugin.GeoExtensionPlugin'
licenseFile = rootProject.file('LICENSE')
noticeFile = rootProject.file('README.md')
}
// exclude junit from implementation to resolve a version conflict (but not from tests)
configurations {
implementation {
exclude(group: 'junit', module: 'junit')
}
}
dependencies {
implementation "org.elasticsearch:elasticsearch:${elastic_version}"
// We ship the legacy geo archive with sources,
// because the compilation stage needs to resolve symbols
// However this archive is not included in the final plugin bundle, since
// legacy geo and its dependencies (JTS) are already present at runtime
// with ES (see the jar/manifest rule below)
compileOnly files('libs/legacy-geo-7.17.6.jar')
// jts.io.common is not part of ES and will be shipped with this plugin
implementation group: 'org.locationtech.jts.io', name: 'jts-io-common', version: '1.15.0'
yamlRestTestImplementation "org.elasticsearch.test:framework:${elastic_version}"
yamlRestTestImplementation "org.apache.logging.log4j:log4j-core:2.17.1"
}
// Since this plugin is meant to be loaded in an ES >=7.16 instance,
// we can "link" it to existing classes through a class path without adding other archives
// to the plugin bundle
jar {
manifest {
attributes(
"Class-Path": "../../modules/legacy-geo/legacy-geo-7.17.6.jar ../../modules/legacy-geo/jts-core-1.15.0.jar ../../modules/legacy-geo/spatial4j-0.7.jar")
}
}
// Make sure the ES distribution used for rest tests is the "complete" variant
// Otherwise weirds errors occur (like the geo_shape type is not handled)
testClusters.configureEach {
testDistribution = 'DEFAULT'
// disable security to disable failing warnings
setting 'xpack.security.enabled', 'false'
}