c74ea769a1
- HelloNashorn now takes a JS file path as command-line argument - Uses jvm-npm (org.bsc:jvm-npm-core:1.1.0) for require() support - Require.root set to script's parent dir so node_modules resolves correctly - Engine created with -scripting mode for load() support
18 lines
269 B
Groovy
18 lines
269 B
Groovy
plugins {
|
|
id 'java'
|
|
id 'application'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.openjdk.nashorn:nashorn-core:15.6'
|
|
implementation 'org.bsc:jvm-npm-core:1.1.0'
|
|
}
|
|
|
|
application {
|
|
mainClass = 'com.example.HelloNashorn'
|
|
}
|