forked from moberwasserlechner/vaadin-chartjs-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
92 lines (75 loc) · 2.22 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'eclipse-wtp'
apply plugin: 'org.springframework.boot'
apply plugin: 'war'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url = "http://maven.vaadin.com/vaadin-addons"}
maven { url = "https://maven.vaadin.com/vaadin-prereleases" }
}
configurations.compile.exclude module: "spring-boot-starter-tomcat"
dependencies {
compile("com.vaadin:vaadin-spring-boot-starter:${vaadinSpringVersion}")
compile("org.springframework.boot:spring-boot-starter-undertow:${springBootVersion}")
compile("com.byteowls:vaadin-chartjs:${addonVersion}")
compile ("de.java2html:java2html:5.0")
testCompile('org.springframework.boot:spring-boot-starter-test')
compile ("com.vaadin:vaadin-server:${vaadinVersion}")
compile ("com.vaadin:vaadin-client-compiled:${vaadinVersion}")
compile ("com.vaadin:vaadin-themes:${vaadinVersion}")
compile ("com.yahoo.platform.yui:yuicompressor:2.4.8")
}
project.ext.vaadinThemeDir = "VAADIN/themes/${vaadinTheme}"
project.ext.vaadinCssDir = "${project.buildDir}/tmp/styles"
task compileVaadinScss(type: JavaExec) {
def styleDir = new File("${vaadinCssDir}")
if (!styleDir.exists()) {
styleDir.mkdirs()
}
classpath = sourceSets.main.compileClasspath
main = 'com.vaadin.sass.SassCompiler'
args = [
"src/main/webapp/${project.vaadinThemeDir}/styles.scss",
"${vaadinCssDir}/styles.css",
"-minify:true",
"-compress:true"
]
}
war {
dependsOn compileVaadinScss
baseName = project.ext.artifactId
from ("${vaadinCssDir}") {
into vaadinThemeDir
}
excludes = [
"${vaadinThemeDir}/*.scss",
"${vaadinThemeDir}/*.cache"
]
// Add sources
webInf {
into('classes'){
from sourceSets.main.allJava
}
}
}
bootRun {
addResources = true
systemProperties System.properties
}
task wrapper(type: Wrapper) {
gradleVersion = '3.5'
}