3

Can Gradle possibly execute JavaScript?

While there is no standard plugins for javascript, is it possible to make something like JavaExec

task execute(type:JavaExec) {
   main = mainClass
   classpath = sourceSets.main.runtimeClasspath
}

Reason: with Java 8 Nashorn and Avatar.js project application entry point can be JavaScript file, not Java.

Searches for Gradle JavaScript plugin gives web oriented solutions, like https://github.com/eriwen/gradle-js-plugin

related to Gradle to execute Java class (without modifying build.gradle)

Cœur
  • 34,719
  • 24
  • 185
  • 251
Paul Verest
  • 55,983
  • 44
  • 191
  • 313

0 Answers0