Skip to content

Instantly share code, notes, and snippets.

@esycat
Last active January 1, 2016 09:08
Show Gist options
  • Save esycat/8122571 to your computer and use it in GitHub Desktop.
Save esycat/8122571 to your computer and use it in GitHub Desktop.
MinifyJsTask doesn't work from an included file https://github.com/eriwen/gradle-js-plugin/issues/61
.gradle
build
main.min.js
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'com.eriwen', name: 'gradle-js-plugin', version: gradleJsPluginVersion
}
}
apply plugin: 'js'
apply from: 'minify.gradle'
defaultTasks 'build'
task clean(dependsOn: minifyJsClean)
task build(dependsOn: minifyJsExtermal)
task buildAlt(dependsOn: 'minifyJsLocal')
task minifyJsLocal(type: com.eriwen.gradle.js.tasks.MinifyJsTask) {
source = file('main.js')
dest = file('main.min.js')
}
gradleJsPluginVersion = 1.9.+
function subProj1() {
console.log('Just a test.')
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'com.eriwen', name: 'gradle-js-plugin', version: gradleJsPluginVersion
}
}
apply plugin: 'js'
task minifyJsExtermal(type: com.eriwen.gradle.js.tasks.MinifyJsTask) {
source = file('main.js')
dest = file('main.min.js')
}
task minifyJsClean(type: Delete) {
delete 'main.min.js'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment