Hi, I am trying to run <gradle-js-plugin> with ko...
# gradle
r
Hi, I am trying to run gradle-js-plugin with kotlin dsl, but I am unable to set the properties. Does anyone know how to set the groovy closure with the Kotlin dsl? This is what I have right now:
Copy code
tasks.register<MinifyJsTask>("minifyTop") {
  source = fileTree(combineTop.dest)
  setDest(file("$buildDir/js/min/app.core.top.min.js"))
  closure {
    warningLevel = "QUIET"
    compilerOptions.languageIn = CompilerOptions.LanguageMode.ECMASCRIPT5
  }
}
But it will give errors that indicate that the languageIn setting is not picked up. For some reference, this is the gradle dsl configuration that works:
Copy code
minifyJs {
  source = jsDev
  dest = file("${projectDir}/client/web/js/all.min.js")
  closure {
    warningLevel = 'QUIET'
    compilerOptions.languageIn = "ECMASCRIPT5"
  }
}