Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding example demonstrating issue #34

  • Loading branch information...
commit be22b0f5f5e79def874052431835e8118c5f8b4b 1 parent b2c9f80
@eriwen authored
Showing with 49 additions and 0 deletions.
  1. +49 −0 issue34.gradle
View
49 issue34.gradle
@@ -0,0 +1,49 @@
+buildscript {
+ repositories {
+ mavenLocal()
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'com.eriwen:gradle-js-plugin:1.2'
+ }
+}
+
+apply plugin: 'js'
+
+javascript.source {
+ custom {
+ js {
+ srcDir "src/test/resources"
+ include "file*.js"
+ }
+ }
+}
+
+task combineAJs(type: com.eriwen.gradle.js.tasks.CombineJsTask) {
+ source = javascript.source.custom.js.files
+ dest = "${buildDir}/js/a.js"
+}
+
+task combineBJs(type: com.eriwen.gradle.js.tasks.CombineJsTask) {
+ source = javascript.source.custom.js.files
+ dest = "${buildDir}/js/b.js"
+}
+
+task minifyAJs(type: com.eriwen.gradle.js.tasks.MinifyJsTask) {
+ source = combineAJs
+ dest = file("${buildDir}/js/a-min.js")
+ closure {
+ compilationLevel = 'SIMPLE_OPTIMIZATIONS'
+ warningLevel = 'QUIET'
+ }
+}
+
+task minifyBJs(type: com.eriwen.gradle.js.tasks.MinifyJsTask) {
+ source = combineBJs
+ dest = file("${buildDir}/js/b-min.js")
+ closure {
+ compilationLevel = 'ADVANCED_OPTIMIZATIONS'
+ externs = files("src/test/resources/externs.js")
+ warningLevel = 'QUIET'
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.