forked from FineUploader/fine-uploader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
49 lines (40 loc) · 1.24 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
def version = "3.0"
def filename = "fineuploader"
def jsSrcDir = 'client/js'
apply plugin: 'js'
def coreFiles = ["${jsSrcDir}/header.js",
"${jsSrcDir}/util.js",
"${jsSrcDir}/button.js",
"${jsSrcDir}/uploader.basic.js",
"${jsSrcDir}/uploader.js",
"${jsSrcDir}/handler.base.js",
"${jsSrcDir}/handler.form.js",
"${jsSrcDir}/handler.xhr.js"]
def jQueryPluginFiles = ["${jsSrcDir}/jquery-plugin.js"]
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.eriwen:gradle-js-plugin:1.0.2'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.0'
}
combineJs {
source = files(coreFiles)
dest = file("$buildDir/${filename}-${version}.js")
}
task combineJsJquery(type: com.eriwen.gradle.js.tasks.CombineJsTask) {
source = files(coreFiles + jQueryPluginFiles)
dest = file("$buildDir/jquery.${filename}-${version}.js")
}
minifyJs {
source = combineJs
dest = file("$buildDir/${filename}-${version}.min.js")
}
task minifyJsJquery(type: com.eriwen.gradle.js.tasks.MinifyJsTask) {
source = combineJsJquery
dest = file("$buildDir/jquery.${filename}-${version}.min.js")
}