-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
79 lines (58 loc) · 2.05 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
allprojects {
apply plugin: "eclipse-wtp"
apply plugin: "idea"
}
//common for both projects
subprojects {
ext.baseNameUpper = project.parent.name.capitalize()
ext.baseNameLower = project.parent.name.toLowerCase()
apply plugin: "java"
apply from: "http://plugins.jasoft.fi/vaadin.plugin"
vaadin.version="7.6.2"
vaadin.gwt.draftCompile = true
vaadin.gwt.strict = true
vaadin.manageWidgetset = false
vaadin.plugin.logToConsole = true
vaadin.addon.author = "Risto Yrjänä / Vaadin"
vaadin.addon.license = "Apache License 2.0"
vaadin.addon.title = baseNameUpper
sourceCompatibility = "1.7"
targetCompatibility = "1.7"
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") {
eclipse.project.name = "${baseNameUpper}-addon"
version = "2.1.0"
vaadin.widgetset = "${group}.widgetset.${baseNameUpper}Widgetset"
vaadin.addon.styles = ["/VAADIN/addons/stepper/stepper.scss"]
dependencies {
testCompile "junit:junit:latest.release"
}
jar {
from sourceSets.main.allJava //include sources
}
war.enabled = false //war plugin applied by the Vaadin plugin, not needed here
}
//demo project, builds addon and packages demo UI as WAR
project(":demo") {
eclipse.project.name = "${baseNameUpper}-demo"
dependencies {
compile project(":addon")
compile "com.google.guava:guava:latest.release"
}
vaadin {
widgetset = "${group}.widgetset.${baseNameUpper}DemoWidgetset"
plugin.openInBrowser = false
devmode.superDevMode = 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
}