Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to sbt-native-image #29

Merged
merged 1 commit into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed bootstrap
Binary file not shown.
13 changes: 7 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lazy val root = (project in file("."))
.enablePlugins(RiffRaffArtifact)
.enablePlugins(RiffRaffArtifact, NativeImagePlugin)
.settings(
name := "invoicing-api",
description := "Zuora Invoice management for supporters (refund, etc.)",
Expand All @@ -26,6 +26,11 @@ lazy val root = (project in file("."))
"-Xasync"
),
Compile / mainClass := Some("bootstrap"), // AWS custom runtime entry point
nativeImageOptions ++= Seq(
"--enable-http",
"--enable-https",
"--no-fallback",
),
)

lazy val deployAwsLambda = inputKey[Unit]("Directly update AWS lambda code from DEV instead of via RiffRaff for faster feedback loop")
Expand All @@ -45,8 +50,4 @@ deployAwsLambda := {
}
}

lazy val packageNativeAwsImage = inputKey[Unit]("Build GraalVM native image and package in AWS custom runtime format")
packageNativeAwsImage := {
import scala.sys.process._
s"sh ${baseDirectory.value}/package.sh" !
}
addCommandAlias("packageNativeAwsImage", "nativeImageCopy target/scala-2.13/bootstrap")
17 changes: 0 additions & 17 deletions package.sh

This file was deleted.

2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.4.2
sbt.version=1.4.4
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("com.gu" % "sbt-riffraff-artifact" % "1.1.9")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.5")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.5")
addSbtPlugin("org.scalameta" % "sbt-native-image" % "0.2.2")