-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle
65 lines (60 loc) · 1.97 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
ext {
grailsNavRepo = 'https://raw.githubusercontent.com/grails/grails-navbar/master'
}
task downloadNavbarStylesheets {
ext {
grailsNavStylesheets = ['font-awesome.min.css', 'navbar.css', 'stMenu.css']
resourceStylesheets = 'src/main/resources/css'
}
doLast {
for(String stylesheet : grailsNavStylesheets) {
ant.get(src: "${grailsNavRepo}/assets/stylesheets/${stylesheet}", dest: file("${resourceStylesheets}/${stylesheet}"))
}
}
}
task downloadNavbarImages {
ext {
resourceImages = 'src/main/resources/img'
grailsNavImages = ['grails-cupsonly-logo-white.svg']
}
doLast {
for(String image : grailsNavImages) {
ant.get(src: "${grailsNavRepo}/assets/images/${image}", dest: file("${resourceImages}/${image}"))
}
}
}
task downloadNavbarJavascripts {
ext {
resourceJavascripts = 'src/main/resources/js'
grailsNavJavascripts = ['classie.js', 'navbar.js', 'sidebarEffects.js']
}
doLast {
for(String js : grailsNavJavascripts) {
ant.get(src: "${grailsNavRepo}/assets/javascripts/${js}", dest: file("${resourceJavascripts}/${js}"))
}
}
}
task downloadNavbarFonts {
ext {
resourceFonts = 'src/main/resources/fonts'
grailsNavFonts = [
'FontAwesome.otf',
'fontawesome-webfont.eot',
'fontawesome-webfont.svg',
'fontawesome-webfont.ttf',
'fontawesome-webfont.woff',
'fontawesome-webfont.woff2',
]
}
doLast {
for(String font : grailsNavFonts) {
ant.get(src: "${grailsNavRepo}/assets/fonts/${font}", dest: file("${resourceFonts}/${font}"))
}
}
}
task downloadNavbarAssets {
dependsOn 'downloadNavbarStylesheets'
dependsOn 'downloadNavbarImages'
dependsOn 'downloadNavbarJavascripts'
dependsOn 'downloadNavbarFonts'
}