-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.gradle
88 lines (76 loc) · 2.48 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
group 'hopding.jrpicam'
version '1.1.1'
apply plugin: 'java'
apply plugin: 'maven'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}
// Don't include example classes in the javadoc
javadoc {
exclude ('com/hopding/jrpicam/examples/**')
}
// Don't include the example classes in the library JAR
jar {
exclude ('com/hopding/jrpicam/examples/**')
}
// Generate JAR with all classes from this project to use
// for building the example JARs
task fatJAR(type: Jar) {
appendix = "fat"
from sourceSets.main.output
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
// Demo View JAR file task
task demoViewJAR(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Demo View',
'Implementation-Version': version,
'Main-Class': 'com.hopding.jrpicam.examples.DemoView'
}
baseName = 'demo-view'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with fatJAR
}
// Shoot Buffered Still JAR file task
task shootBufferedStillJAR(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Shoot Buffered Still',
'Implementation-Version': version,
'Main-Class': 'com.hopding.jrpicam.examples.ShootBufferedStill'
}
baseName = 'shoot-buffered-still'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with fatJAR
}
// Shoot Still JAR file task
task shootStillJAR(type: Jar) {
manifest {
attributes 'Implementation-Title': 'ShootStill',
'Implementation-Version': version,
'Main-Class': 'com.hopding.jrpicam.examples.ShootStill'
}
baseName = 'shoot-still'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with fatJAR
}
// Shoot Timelapse JAR file task
task shootTimelapseJAR(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Shoot Time Lapse',
'Implementation-Version': version,
'Main-Class': 'com.hopding.jrpicam.examples.ShootTimelapse'
}
baseName = 'shoot-timelapse'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with fatJAR
}
// Task to generate/build the four example JAR files
task buildExamples (dependsOn: [
'demoViewJAR',
'shootBufferedStillJAR',
'shootStillJAR',
'shootTimelapseJAR'])