-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
44 lines (35 loc) · 1.12 KB
/
build.gradle
File metadata and controls
44 lines (35 loc) · 1.12 KB
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
apply plugin:'application'
def mainClassName = "ensemble.EnsembleApp"
def FileCollection apachecp = files(
"./lib/lucene-grouping-3.2.0.jar",
"./lib/lucene-core-3.2.0.jar")
sourceSets {
main {
java {
srcDirs 'src/app/java',
'src/generated/java',
'src/samples/java'
}
resources {
srcDirs 'src/app/resources',
'src/generated/resources',
'src/samples/resources'
}
compileClasspath += apachecp
}
}
jar {
manifest.attributes("Main-Class": mainClassName)
// add in the sample sources....
from fileTree('src/samples/java')
// Note: this would be the "gradle" way to add in the Lucene jars
// BUT we run into total path length on Windows with the temp file in ./build
//apachecp.each { from zipTree(it) }
//exclude 'META-INF/*'
}
// Merge the Apache Lucene jars into our master jar.
jar.doLast() {
ant.zip(destfile: jar.archivePath, update: true, duplicate: "preserve") {
zipgroupfileset(dir: new File("./lib"), includes:"*.jar")
}
}