-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle
93 lines (73 loc) · 2.08 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
plugins {
id 'fi.jasoft.plugin.vaadin' version '1.1.6' apply false
id "org.sonarqube" version "2.2"
}
//common for both projects
subprojects {
ext.baseNameUpper = project.parent.name.capitalize()
ext.baseNameLower = project.parent.name.toLowerCase()
apply plugin: 'java'
apply plugin: 'fi.jasoft.plugin.vaadin'
repositories {
mavenCentral()
maven {
url "http://maven.vaadin.com/vaadin-addons"
}
}
vaadin {
version = "8.0.2"
logToConsole = true
}
vaadinCompile {
draftCompile = true
strict = true
}
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
group = "org.vaadin.risto.${baseNameLower}"
//creates archives named "name-version.jar" and "name.war" where name is the name of the main project
archivesBaseName = baseNameLower
}
//addon project, only creates the Directory-compatible JAR
project(":addon") {
version = "2.4.0"
vaadin {
addon {
styles = ["/VAADIN/addons/stepper/stepper.scss"]
author = "Risto Yrjänä / Vaadin"
license = "Apache License 2.0"
title = baseNameUpper
}
}
vaadinCompile {
manageWidgetset = false
widgetset = "${group}.${baseNameUpper}Widgetset"
}
dependencies {
testCompile "junit:junit:4.12"
}
jar {
from sourceSets.main.allJava //include sources
}
war.enabled = false
}
//demo project, builds addon and packages demo UI as WAR
project(":demo") {
vaadinCompile.manageWidgetset = true
vaadinRun {
server = 'jetty'
openInBrowser = false
}
dependencies {
compile project(":addon")
compile group: 'com.google.guava', name: 'guava', version: '21.0'
}
war.enabled = true
}
task(dist, type: Sync, dependsOn: [':addon:jar', ':demo:war']) {
description = "Copies the addon JAR and the demo WAR to target/"
File targetDir = mkdir("target")
from project(":addon").jar.archivePath
from project(":demo").war.archivePath
into targetDir
}