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

Gradle kotlin dsl #173

Open foofigo opened 5 years ago

foofigo commented 5 years ago

Would use the minify plugin on gradle kotlin dsl, but configuration seems not working. This is the build.gradle.kts task i try to do :

tasks{
    "minifyJs"(MinifyJsTask::class) {
        source = filteTree(fileJs.parent) {include(fileJs.name)}
        setDest("build/tm/js/" + fileJs.name)
        closure.compilationLevel = "WHITESPACE_ONLY"
        closure.compilerOptions.languageIn = CompilerOptions.LanguageMode.EMACSCRIPT6
    }
}

Everythings seems working expect the closure configuration. Any idea ? Or did i have made a mistake ?