-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
112 lines (89 loc) · 2.75 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
buildscript {
repositories {
jcenter()
maven { url 'http://repo.spring.io/libs-snapshot' }
}
dependencies {
classpath 'ro.isdc.wro4j.gradle:wro4j-gradle-plugin:1.8.0.Beta4'
classpath 'com.moowork.gradle:gradle-node-plugin:0.11'
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.3.0.RELEASE'
}
}
repositories {
jcenter()
}
group = 'ro.isdc.wro4j.gradle'
version = '1.8.0'
apply plugin: 'java'
apply plugin: 'wro4j'
apply plugin: 'com.moowork.node'
apply plugin: 'spring-boot'
node {
download = true
}
ext {
versionJQuery = '2.1.4'
versionBootstrap = '3.3.4'
versionJasmine = '2.3.4'
}
webResources {
bundle ('core') {
js 'js/**/*.js'
preProcessor 'jsMin'
}
bundle ('libs') {
js "webjars/jquery/$versionJQuery/jquery.min.js"
}
bundle ('theme-default') {
css "webjars/bootstrap/$versionBootstrap/less/bootstrap.less"
css 'themes/default/main.css'
cssOverrideImport "variables.less", "../../../../themes/default/variables.less"
preProcessor 'less4j'
cssRewriteUrl()
}
assets {
include 'themes/default/images/**'
/* Uncomment the following lines if you prefer to copy fonts to your /static/themes/default/fonts */
/*from ("$buildMainDir/webjars/bootstrap/$versionBootstrap/fonts") {
include '**'
into 'themes/default/fonts'
}*/
}
testAssets {
from (srcTestDir) {
exclude '*SpecRunner.html'
exclude '*.conf.js'
}
from (srcTestDir) {
include '*SpecRunner.html'
include '*.conf.js'
expand([
'srcMain': buildMainUri,
'srcTest': buildTestUri,
'webjarJasmine': "$buildTestUri/webjars/jasmine/$versionJasmine"
])
}
}
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-web'
webjars "org.webjars:jquery:$versionJQuery"
/* Use `webjars "org.webjars:bootstrap:$versionBootstrap"` instead if you prefer to have fonts in your /static/... */
webjarsRuntime ("org.webjars:bootstrap:$versionBootstrap") {
transitive = false
}
webjarsTest "org.webjars.bower:jasmine:$versionJasmine"
}
task cleanNodeModules(type: Delete) {
delete file('node_modules')
}
task installJasmine(type: NpmTask) {
outputs.dir file("node_modules")
npmCommand = ['install']
args += ['karma', 'karma-jasmine@2_0', 'karma-phantomjs-launcher']
}
task runJasmine(type: NodeTask, dependsOn: [installJasmine, processWebTestResources]) {
script = file("node_modules/karma/bin/karma")
args = ['start', "${webResources.buildTestDir}/karma.conf.js"]
}
test.dependsOn runJasmine