Skip to content

Commit

Permalink
Fix GraalJS on JDK 9+
Browse files Browse the repository at this point in the history
  • Loading branch information
chbloemer committed Jan 4, 2025
1 parent 23541cb commit 54e4baa
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 22 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest]
java-version: [ 8, 11, 17 ]
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: ${{ matrix.java-version }}
distribution: 'adopt'
cache: 'maven'
- name: Set timezone on Windows
Expand Down
54 changes: 34 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,22 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<graalvm.version>21.3.8</graalvm.version>
<project.scm.id>[email protected]</project.scm.id>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<graalvm.version>21.3.12</graalvm.version>
<java.version>8</java.version>
</properties>

<profiles>
<profile>
<id>javac-release</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<properties>
<maven.compiler.release>8</maven.compiler.release>
</properties>
</profile>
<profile>
<id>release-sign-artifacts</id>
<activation>
Expand Down Expand Up @@ -109,19 +120,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.3</version>
<version>3.2.5</version>
<configuration>
<useFile>false</useFile>
<useModulePath>false</useModulePath>
<trimStackTrace>false</trimStackTrace>
<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -173,7 +182,7 @@
<plugin>
<!-- explicitly define maven-deploy-plugin after other to force exec order -->
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version>
<version>3.1.3</version>
<executions>
<execution>
<id>deploy</id>
Expand All @@ -184,16 +193,25 @@
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.1</version>
<version>3.1.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.2</version>
<configuration>
<archive>
<manifestEntries>
<!-- For Java 11 Modules, specify a module name. Do not create module-info.java until all
our dependencies specify a module name. -->
<Automatic-Module-Name>de.neuland.pug4j</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
Expand All @@ -202,7 +220,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>4.0.0-M9</version>
<version>4.0.0-M16</version>
</plugin>
</plugins>
</build>
Expand Down Expand Up @@ -274,11 +292,7 @@
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<version>${graalvm.version}</version>
</dependency>
<dependency>
<groupId>org.graalvm.compiler</groupId>
<artifactId>compiler</artifactId>
<version>${graalvm.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.graalvm.js</groupId>
Expand All @@ -290,6 +304,7 @@
<groupId>org.graalvm.js</groupId>
<artifactId>js-scriptengine</artifactId>
<version>${graalvm.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.graalvm.tools</groupId>
Expand All @@ -303,13 +318,12 @@
<version>${graalvm.version}</version>
<scope>runtime</scope>
</dependency>

<!-- Testing -->
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.10</version>
<version>2.0.13</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 54e4baa

Please sign in to comment.