This repository was archived by the owner on Apr 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
144 lines (119 loc) · 3.43 KB
/
build.gradle
File metadata and controls
144 lines (119 loc) · 3.43 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
apply plugin: "java"
apply plugin: "war"
apply plugin: "eclipse"
apply plugin: "eclipse-wtp"
apply plugin: "checkstyle"
apply plugin: "findbugs"
apply plugin: "jdepend"
apply plugin: "jetty"
def sourceDir = "$project.projectDir/src"
def testDir = "$project.projectDir/test"
def gwtResources = "$project.projectDir/war"
webAppDirName = "war"
project.version = "1.0"
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
[findbugsMain, findbugsTest]*.ignoreFailures = true
repositories {
mavenCentral()
}
dependencies {
compile "com.thoughtworks.xstream:xstream:1.4.3"
compile "xpp3:xpp3:1.1.4c"
compile "org.jdom:jdom:2.0.2"
compile "com.googlecode.gwtquery:gwtquery:1.2.0"
compile "javax.validation:validation-api:1.0.0.GA"
compile fileTree(dir: "libs", include: "*.jar")
testCompile "junit:junit:4.10"
// Compile GWT libs, needed for gwtCompile and the javaCompile
// Also includes the servlet-api
providedCompile 'com.google.gwt:gwt-user:2.4.0@jar'
providedCompile 'com.google.gwt:gwt-dev:2.4.0'
// Runtime GWT libraries, should be included in WAR
runtime "com.google.gwt:gwt-servlet:2.4.0"
runtime "com.google.gwt:gwt-user:2.4.0"
runtime "javax.validation:validation-api:1.0.0.GA"
}
sourceSets {
main {
java {
srcDir sourceDir
}
}
test {
java {
srcDir testDir
}
}
}
defaultTasks "build"
eclipse {
classpath {
defaultOutputDir file("war/WEB-INF/classes")
containers 'com.google.gwt.eclipse.core.GWT_CONTAINER'
}
project {
natures 'com.google.gwt.eclipse.core.gwtNature'
buildCommand 'com.google.gdt.eclipse.core.webAppProjectValidator'
buildCommand 'com.google.gwt.eclipse.core.gwtProjectValidator'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.1'
}
task compileGwt (dependsOn: classes, type: JavaExec) {
description = "Compiles the GWT JavaScript files"
ext.buildDir = "${project.buildDir}/gwt"
ext.extraDir = "${project.buildDir}/extra"
inputs.source sourceSets.main.java.srcDirs
inputs.dir sourceSets.main.output.resourcesDir
outputs.dir buildDir
// Workaround for incremental build (GRADLE-1483)
outputs.upToDateSpec = new org.gradle.api.specs.AndSpec()
doFirst {
file(buildDir).mkdirs()
}
main = 'com.google.gwt.dev.Compiler'
classpath {
[
sourceSets.main.java.srcDirs, // Java source
sourceSets.main.output.resourcesDir, // Generated resources
sourceSets.main.output.classesDir, // Generated classes
sourceSets.main.compileClasspath, // Deps
]
}
args =
[
'fhdw.ipscrum.IpScrum', // Your GWT module
'-war', buildDir,
'-logLevel', 'INFO',
'-localWorkers', '2',
'-compileReport',
'-extra', extraDir,
// '-draftCompile' // Speeds up compile with 25%
]
maxHeapSize = '1G'
}
war {
ext.runDate = new Date()
classifier = runDate.format("yyyyMMddHHmmss")
dependsOn compileGwt
from compileGwt.buildDir
exclude "WEB-INF/lib/*"
eachFile { d ->
if (d.name.equals("IpScrum.html")) {
d.expand (
version: "$version",
buildTime: runDate.format("yyyy-MM-dd HH:mm:ss")
)
}
}
}
checkstyleTest {
configFile = file("$project.projectDir/config/checkstyle/checkstyle-test.xml")
}
checkstyleMain {
excludes = [
"fhdw/ipscrum/client/view/**/*.java",
"fhdw/ipscrum/client/architecture/widgets/**/*.java"
]
}