forked from lucene-gosen/lucene-gosen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
95 lines (75 loc) · 2.51 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
repositories {
mavenLocal()
mavenCentral()
maven {
url "http://maven.restlet.com"
}
}
group 'com.github.lucene-gosen'
description 'Japanese analysis for Apache Lucene/Solr'
apply plugin: 'java'
apply plugin: 'idea'
version = luceneVersion
dependencies {
compile "org.apache.lucene:lucene-core:${luceneVersion}"
compile "org.apache.lucene:lucene-analyzers-common:${luceneVersion}"
compile "org.apache.lucene:lucene-codecs:${luceneVersion}"
compile "com.ibm.icu:icu4j:${icu4jVersion}"
compile "org.restlet.jee:org.restlet:${restletVersion}"
compile "org.restlet.jee:org.restlet.ext.servlet:${restletVersion}"
testCompile "junit:junit:${junitVersion}"
testCompile "org.apache.lucene:lucene-test-framework:${luceneVersion}"
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${randomizedrunnerVersion}"
}
jar {
version version
}
javadoc {
options.locale = 'en_US'
}
defaultTasks 'clean', 'dist'
// Re-build dictionary with user custom dictionaries, without copy
task rebuildNaistChasenDic() {
doLast {
println "rebuilding dicitonary"
}
}
tasks.rebuildNaistChasenDic.dependsOn(compileJava, ":dictionary:cleanCompiledNaistChasen", ":dictionary:compileNaistChasen")
task rebuildIpadicDic() {
doLast {
println "rebuilding dicitonary"
}
}
tasks.rebuildIpadicDic.dependsOn(compileJava, ":dictionary:cleanCompiledIpadic", ":dictionary:compileIpadic")
// Create Jar library without dictionary
task jarWithNaistChasen(type: Jar) {
classifier naistDictype
from files(sourceSets.main.output,
fileTree("dictionary" + File.separator
+ naistDictype + File.separator + compiledDicDir).include('**/*.sen')
)
}
tasks.jarWithNaistChasen.dependsOn(compileJava, ":dictionary:compileNaistChasen")
task jarWithIpadic(type: Jar) {
classifier ipadicDictype
from files(sourceSets.main.output,
fileTree("dictionary" + File.separator
+ ipadicDictype + File.separator + compiledDicDir).include('**/*.sen')
)
}
tasks.jarWithIpadic.dependsOn(compileJava, ":dictionary:compileIpadic")
task javadocJar(type: Jar) {
classifier 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
}
// Make packages for distribution
task dist(dependsOn: [jar, jarWithIpadic, jarWithNaistChasen, test]) {
}
tasks.test.dependsOn(compileJava, ":dictionary:compileNaistChasen", ":dictionary:compileIpadic")
if (gradle.startParameter.taskNames.contains('uploadArchives')) {
apply from: 'uploadArchives.gradle'
}