Last active
January 1, 2016 09:08
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gradle | |
build | |
main.min.js | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gradleJsPluginVersion = 1.9.+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function subProj1() { | |
console.log('Just a test.') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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