!jdk.internal.reflect.*,
!jdk.vm.ci.services
</bnd.importpackage>
- <graal.version>22.0.0.2</graal.version> <!-- DO NOT UPGRADE: 22.0.0.2 is the latest version working on armv7l / OpenJDK 11.0.16 -->
- <asm.version>6.2.1</asm.version>
+ <graal.version>22.0.0.2</graal.version> <!-- DO NOT UPGRADE: 22.0.0.2 is the latest version working on armv7l / OpenJDK 11.0.16 & armv7l / Zulu 17.0.5+8 -->
<oh.version>${project.version}</oh.version>
<ohjs.version>openhab@3.1.2</ohjs.version>
</properties>
<artifactId>js-scriptengine</artifactId>
<version>${graal.version}</version>
</dependency>
- <dependency>
- <groupId>org.graalvm.js</groupId>
- <artifactId>js-launcher</artifactId>
- <version>${graal.version}</version>
- </dependency>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<artifactId>js</artifactId>
<version>${graal.version}</version>
</dependency>
- <!-- com.ibm.icu.icu4j/69.1 is not required on GraalJS >= 22.0.0 as it moved to org.graalvm.truffle -->
-
- <!-- include as version required is older than OH provides -->
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm</artifactId>
- <version>${asm.version}</version>
- </dependency>
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm-commons</artifactId>
- <version>${asm.version}</version>
- </dependency>
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm-tree</artifactId>
- <version>${asm.version}</version>
- </dependency>
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm-util</artifactId>
- <version>${asm.version}</version>
- </dependency>
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm-analysis</artifactId>
- <version>${asm.version}</version>
- </dependency>
+ <!-- GraalJS changelog says that com.ibm.icu/icu4j is not required for GraalJS >= 22.0.0 as it moved to org.graalvm.truffle;
+ but GraalJS >= 22.2.0 requires it, so we'll need to add it when we upgrade -->
</dependencies>
</project>
.build(),
Context.newBuilder("js").allowExperimentalOptions(true).allowAllAccess(true)
.allowHostAccess(HOST_ACCESS).option("js.commonjs-require-cwd", JSDependencyTracker.LIB_PATH)
- .option("js.nashorn-compat", "true") // to ease migration
- .option("js.ecmascript-version", "2021") // nashorn compat will enforce es5 compatibility, we
- // want ecma2021
- .option("js.commonjs-require", "true") // enable CommonJS module support
+ .option("js.nashorn-compat", "true") // Enable Nashorn compat mode as openhab-js relies on
+ // accessors, see
+ // https://github.com/oracle/graaljs/blob/master/docs/user/NashornMigrationGuide.md#accessors
+ .option("js.ecmascript-version", "2022") // If Nashorn compat is enabled, it will enforce ES5
+ // compatibility, we want ECMA2022
+ .option("js.commonjs-require", "true") // Enable CommonJS module support
.hostClassLoader(getClass().getClassLoader())
.fileSystem(new DelegatingFileSystem(FileSystems.getDefault().provider()) {
@Override