-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
65 lines (51 loc) · 1.65 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
group 'org.openkoreantext'
version '5.4.0.2'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
configurations {
distJars {
extendsFrom runtime
}
}
ext {
elasticsearchVersion = '5.4.0'
openKoreanTextVersion = '2.0.1'
}
test {
jvmArgs '-Dtests.security.manager=false'
}
dependencies {
compile group: 'org.openkoreantext', name: 'open-korean-text', version: openKoreanTextVersion
compileOnly group: 'org.elasticsearch', name: 'elasticsearch', version: elasticsearchVersion
testCompile group: 'org.elasticsearch.test', name: 'framework', version: elasticsearchVersion
testCompile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.7'
testCompile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.7'
}
task makePluginDescriptor(type: Copy) {
from 'src/main/resources'
into 'build/tmp/plugin'
expand([
'descriptor': [
'name': 'elasticserach-analysis-openkoreantext',
'classname': 'org.elasticsearch.plugin.analysis.openkoreantext.AnalysisOpenKoreanTextPlugin',
'description': 'Korean analysis plugin integrates open-korean-text module into elasticsearch.',
'version': '1.0.0',
'javaVersion': sourceCompatibility,
'elasticsearchVersion' : '5.4.0'
]
])
}
task buildPluginZip(type: Zip, dependsOn: [':jar', ':makePluginDescriptor']) {
from configurations.distJars
from jar.archivePath
from 'build/tmp/plugin'
into 'elasticsearch'
classifier = 'plugin'
}
build.finalizedBy(buildPluginZip)
task wrapper(type: Wrapper) {
gradleVersion = '3.4'
}