Skip to content

Commit 0c9acd0

Browse files
authored
Update 7-graal-native-executables.adoc
1 parent cbada55 commit 0c9acd0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

blog/modules/ROOT/pages/7-graal-native-executables.adoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ portable get published only once across all platforms, while the native CPU-spec
561561
gets published once per platform
562562

563563
Each job overrides `artifactName` based on `os.name` and `os.arch` such that it publishes to a
564-
different artifact on Maven Central, and we override the default `publishArtifacts` to replace
564+
different artifact on Maven Central, and we override `def jar` to replace
565565
the default `.jar` artifact with our native image:
566566

567567
```scala
@@ -581,9 +581,7 @@ def artifactCpuSuffix = Task {
581581

582582
override def artifactName = s"${super.artifactName()}-${artifactOsSuffix()}-${artifactCpuSuffix()}"
583583

584-
override def publishArtifacts = Task {
585-
super.publishArtifacts().copy(payload = Seq(nativeImage() -> artifactName()))
586-
}
584+
override def jar = nativeImage()
587585
```
588586

589587
This results in the following artifacts being published:
@@ -606,7 +604,7 @@ These artifacts can be seen online:
606604
And downloaded via
607605

608606
```bash
609-
curl https://repo1.maven.org/maven2/com/lihaoyi/mill-dist-native-mac-aarch64/0.12.6/mill-dist-native-mac-aarch64 -o mill-dist-native
607+
curl https://repo1.maven.org/maven2/com/lihaoyi/mill-dist-native-mac-aarch64/0.12.6/mill-dist-native-mac-aarch64-0.12.6.jar -o mill-dist-native
610608
chmod +x mill-dist-native
611609
./mill-dist-native version
612610
0.12.6

0 commit comments

Comments
 (0)