Skip to content

Commit 91f4ffd

Browse files
author
Jules Ivanic
committed
Remove components: native-image for GraalVM Distribution (JDK 17+)
Since GraalVM for JDK 17, native-image is bundled by default and the components parameter is deprecated, causing a warning in GitHub Actions. See: oracle/graal#5995
1 parent c3eba43 commit 91f4ffd

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/main/scala/sbtghactions/WorkflowStep.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,15 @@ object WorkflowStep {
6464
"github-token" -> s"$${{ secrets.GITHUB_TOKEN }}",
6565
"cache" -> "sbt"))
6666
case jv @ JavaSpec(JavaSpec.Distribution.GraalVM(Graalvm.Distribution(distribution)), version) =>
67+
// Note: native-image is included by default in GraalVM for JDK 17+
68+
// See: https://github.com/oracle/graal/pull/5995
6769
WorkflowStep.Use(
6870
Action.setupGraalvm,
6971
name = Some(s"Setup GraalVM (${jv.render})"),
7072
cond = Some(s"matrix.java == '${jv.render}'"),
7173
params = ListMap(
7274
"java-version" -> s"$version",
7375
"distribution" -> distribution,
74-
"components" -> "native-image",
7576
"github-token" -> s"$${{ secrets.GITHUB_TOKEN }}",
7677
"cache" -> "sbt"))
7778
case jv @ JavaSpec(dist, version) =>

src/test/scala/sbtghactions/GenerativePluginSpec.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,9 @@ class GenerativePluginSpec extends Specification {
594594
javas = javas),
595595
"")
596596

597-
results mustEqual s"""abc:
597+
// Note: components: native-image is not included for Graalvm.Distribution
598+
// because native-image is bundled by default in GraalVM for JDK 17+
599+
results mustEqual s"""abc:
598600
name: How to get to...
599601
strategy:
600602
matrix:
@@ -609,7 +611,6 @@ class GenerativePluginSpec extends Specification {
609611
with:
610612
java-version: 17
611613
distribution: graalvm
612-
components: native-image
613614
github-token: $${{ secrets.GITHUB_TOKEN }}
614615
cache: sbt"""
615616
}

0 commit comments

Comments
 (0)