-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
113 lines (93 loc) · 2.69 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
group 'org.openkoreantext'
version '6.2.2.2'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'jacoco'
sourceCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
}
configurations {
distJars {
extendsFrom runtime
}
}
ext {
elasticsearchVersion = '6.2.2'
openKoreanTextVersion = '2.1.0'
}
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.9.1'
testCompile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.9.1'
}
task makePluginDescriptor(type: Copy) {
from 'src/main/resources'
into 'build/tmp/plugin'
expand([
'descriptor': [
'name': 'elasticsearch-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' : elasticsearchVersion
]
])
}
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 javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
test {
jvmArgs '-Dtests.security.manager=false'
}
jacoco {
toolVersion = '0.7.1.201405082137'
}
jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
sourceDirectories = files(sourceSets.main.allSource.srcDirs)
classDirectories = files(sourceSets.main.output)
executionData = files(jacocoTestReport.executionData)
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
task wrapper(type: Wrapper) {
gradleVersion = '3.4'
}