Skip to content

Commit

Permalink
Add the win/aarch64 dll to the jar
Browse files Browse the repository at this point in the history
  • Loading branch information
luben committed Oct 29, 2023
1 parent 53b268e commit bf5afd1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:

- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master'}}
shell: cmd
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
11 changes: 11 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ Compile / packageBin / packageOptions ++= Seq(
|linux/riscv64/libzstd-jni-${version.value}.so;osname=Linux;processor=riscv64,
|linux/s390x/libzstd-jni-${version.value}.so;osname=Linux;processor=s390x,
|win/amd64/libzstd-jni-${version.value}.dll;osname=Win32;processor=amd64,
|win/aarch64/libzstd-jni-${version.value}.dll;osname=Win32;processor=aarch64,
|win/x86/libzstd-jni-${version.value}.dll;osname=Win32;processor=x86""".stripMargin}),
)

Expand Down Expand Up @@ -410,3 +411,13 @@ Win_amd64 / packageBin / packageOptions ++= Seq(
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Automatic-Module-Name") -> "com.github.luben.zstd_jni"),
)
addArtifact(Artifact(nameValue, "win_amd64"), Win_amd64 / packageBin)

val Win_aarch64 = config("win_aarch64").extend(Compile)
inConfig(Win_aarch64)(Defaults.compileSettings)
Win_aarch64 / packageBin / mappings := {
(file(s"target/classes/win/aarch64/libzstd-jni-${version.value}.dll"), s"win/aarch64/libzstd-jni-${version.value}.dll") :: classes
}
Win_aarch64 / packageBin / packageOptions ++= Seq(
Package.ManifestAttributes(new java.util.jar.Attributes.Name("Automatic-Module-Name") -> "com.github.luben.zstd_jni"),
)
addArtifact(Artifact(nameValue, "win_aarch64"), Win_aarch64 / packageBin)

0 comments on commit bf5afd1

Please sign in to comment.