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
  • 37,241
  • 25
  • 195
  • 267
Paul Verest
  • 60,022
  • 51
  • 208
  • 332

0 Answers0