eriwen / gradle-js-plugin

Gradle plugin for working with JS
http://eriwen.github.io/gradle-js-plugin
Apache License 2.0
382 stars 113 forks source link

No enum constant com.google.javascript.jscomp.CompilationLevel.ADVANCED_OPTIMISATIONS #132

Closed akisystems closed 8 years ago

akisystems commented 8 years ago

I get the aforementioned error when running with the following configuration:

javascript.source {
    dev {
        js {
            srcDir 'src/main/resources/static/js'
            include "*.js"
            exclude "*.min.js"
        }
    }
    prod {
        js {
            srcDir 'src/main/resources/static/js'
            include "*.min.js"
        }
    }
}

minifyJs {
    source = 'src/main/resources/static/js/blah.js'
    dest = "${buildDir}/resources/main/static/js/blah.js"
    closure {
        compilationLevel = 'ADVANCED_OPTIMISATIONS'
        warningLevel = 'QUIET'
    }
}

I'm using version 2.12.0 and I've also tried 2.14.1, but the error appears with with either. Please help!

eriwen commented 8 years ago

@akisystems According to the Closure Compiler docs, compilationLevel should actually be 'ADVANCED_OPTIMIZATIONS'.

Please confirm if that fixes your issue and I'll close this.

akisystems commented 8 years ago

facepalm How stupid of me! Thanks and sorry for wasting your time!