forked from paffman/WBS-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
95 lines (75 loc) · 2.26 KB
/
build.gradle
File metadata and controls
95 lines (75 loc) · 2.26 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
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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:0.8'
}
}
apply plugin: 'application'
apply plugin: 'eclipse'
apply plugin: 'checkstyle'
apply plugin: 'idea'
apply plugin: 'shadow'
sourceCompatibility = 1.7
version = '3.0'
// download dependencies from Maven Central
repositories {
mavenCentral()
}
dependencies {
// dependencies for our main app
compile group: 'jfree', name: 'jcommon', version: '1.0.16'
compile group: 'jfree', name: 'jfreechart', version: '1.0.13'
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.28'
compile group: 'c10n', name: 'c10n-core', version: '1.1'
// dependencies for our tests
testCompile group: 'junit', name: 'junit', version: '4.11'
// dependencies needed at runtime
runtime group: 'mysql', name: 'mysql-connector-java', version: '5.1.28'
}
// main application class
mainClassName = 'de.fhbingen.wbs.controller.LoginViewController'
tasks.withType(JavaCompile) {
options.encoding = "utf-8"
}
// test task configuration
test {
// tests in this package are executed via the test suite
exclude 'de/fhbingen/wbs/dbaccess/models/mysql/*Test.class'
}
jar {
manifest {
attributes 'Main-Class': 'de.fhbingen.wbs.controller.LoginViewController'
}
}
shadow {
classifier 'dist'
}
task wrapper(type: Wrapper) {
gradleVersion = '1.10'
}
// checkstyle configurations
tasks.withType(Checkstyle) {
ignoreFailures = true
}
task csReport (dependsOn: [checkstyleMain, checkstyleTest]) << {
ant.xslt(in: "$reporting.baseDir/checkstyle/main.xml",
style: "config/checkstyle/checkstyle-simple.xsl",
out: "$reporting.baseDir/checkstyle/main.html")
ant.xslt(in: "$reporting.baseDir/checkstyle/test.xml",
style: "config/checkstyle/checkstyle-simple.xsl",
out: "$reporting.baseDir/checkstyle/test.html")
}
check.dependsOn csReport
task(createVersionFile) {
ext.resDir = new File("${rootDir}/src/main/resources")
resDir.mkdirs()
ext.f = new File(resDir, "version")
outputs.file f
doLast {
ext.gitTag = "git describe".execute().in.text
f.text = gitTag
}
}
compileJava.dependsOn(createVersionFile)