-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
96 lines (75 loc) · 1.95 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
// ===== Plugins to use =====
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'distribution'
// ===== Project settings =====
group = 'de.prim.avilight'
version = '1.0'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
defaultTasks( 'distributeAviLightConfig' )
// ===== Dependency Management =====
repositories {
mavenCentral()
}
dependencies {
compile 'javax.xml.bind:jaxb-api:2.2.12'
compile files( 'lib/RXTXcomm.jar' )
archives files( 'lib/RXTXcomm.jar' )
archives 'javax.xml.bind:jaxb-api:2.2.12'
testCompile 'org.testng:testng:6.9.10'
}
// ===== Java Settings =====
sourceSets {
main {
resources {
exclude 'batchfiles/**'
}
}
test {
resources {
exclude 'testng.xml'
}
}
}
compileJava {
options.encoding = 'UTF-8'
}
jar {
manifest {
attributes(
'Main-Class': 'de.prim.avilight.Start',
'Class-Path': '../lib/RXTXcomm.jar ../lib/jaxb-api-2.2.12.jar'
)
}
}
test.useTestNG()
// ===== Distribution Settings =====
distributions {
main {
baseName = 'AviLightConfig'
contents {
into('lib') {
from configurations.archives
from {'lib/RXTXcomm'}
}
into('bin') {
from {'build/libs'}
}
from {'src/main/resources/batchfiles'}
}
}
}
// ===== Inherited Tasks Settings =====
compileJava.dependsOn clean
distZip.dependsOn jar
distTar.dependsOn jar
eclipseJdt << {
File prefsResources = file('.settings/org.eclipse.core.resources.prefs')
prefsResources.write('eclipse.preferences.version=1\r\n')
prefsResources.append('encoding/<project>=UTF-8')
File prefsRuntime = file('.settings/org.eclipse.core.runtime.prefs')
prefsRuntime.write('eclipse.preferences.version=1\r\n')
prefsRuntime.append('line.separator=\\r\\n') }
// ===== Own Task Definitions =====
task distributeAvilightConfig(dependsOn: distZip)