Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (40 sloc) 1.24 KB
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")
}