-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
85 lines (73 loc) · 2.05 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
plugins {
id 'java'
}
group 'shineware'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
configurations {
includeCompile
}
ext {
komoranVersion = '3.3.7'
}
project.ext {
elist = new HashSet<File>()
}
//jar {
// from {
// configurations.includeCompile.collect {
// println("contains : " + it.toString())
//// it.isDirectory() ? it : zipTree(it)
// if (it.isDirectory()) {
// return it
// } else {
// if (!project.elist.contains(it)) {
// project.elist.add(it)
// return zipTree(it)
// }
// return it
// }
// }
// }
// exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
//}
task makePlugin(type: Zip) {
dependsOn(":build")
from {
configurations.includeCompile.collect {
if (it.isDirectory()) {
return it
} else {
if (!project.elist.contains(it)) {
project.elist.add(it)
if (it.name == "KOMORAN-$komoranVersion" + ".jar") {
include it.name
}
}
return it
}
}
}
from("build/libs/") {
include "*"
}
from("src/main/resources/") {
include "*"
}
archiveName('komoran-tokenizer.zip')
destinationDir(file('.'))
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'org.apache.lucene', name: 'lucene-analyzers-common', version: '8.2.0'
testCompile group: 'org.apache.lucene', name: 'lucene-test-framework', version: '8.2.0'
compile group: 'org.elasticsearch', name: 'elasticsearch', version: '7.4.1'
includeCompile "com.github.shin285:KOMORAN:$komoranVersion"
configurations.compile.extendsFrom(configurations.includeCompile)
}
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"