Skip to content

Commit

Permalink
add subproject up
Browse files Browse the repository at this point in the history
  • Loading branch information
mio-19 committed Aug 22, 2024
1 parent dc0889f commit 6b4d017
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions chester-in-scala/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ val commonSettings = Seq(
githubTokenSource := TokenSource.GitConfig("github.token") || TokenSource.Environment("GITHUB_TOKEN"),
resolvers += Resolver.githubPackages("edadma", "readline"),
)
val graalvmSettings = Seq(
nativeImageVersion := graalVersion,
nativeImageOptions := nativeImageOption,
nativeImageJvm := graalVm,
)

commonSettings

Expand Down Expand Up @@ -122,9 +127,7 @@ lazy val cli = crossProject(JSPlatform, JVMPlatform, NativePlatform).withoutSuff
)
.jvmSettings(
nativeImageOutput := file("target") / "chester",
nativeImageVersion := graalVersion,
nativeImageOptions := nativeImageOption,
nativeImageJvm := graalVm,
graalvmSettings,
libraryDependencies ++= Seq(
// https://github.com/jline/jline3/issues/954
"org.jline" % "jline" % (if(graalvm17) "3.24.1" else "3.26.2"),
Expand All @@ -147,6 +150,26 @@ lazy val cli = crossProject(JSPlatform, JVMPlatform, NativePlatform).withoutSuff
scalacOptions ++= (if (unix && permitGPLcontamination) Seq("-Xmacro-settings:com.eed3si9n.ifdef.declare:readline") else Seq())
)

lazy val up = crossProject(JSPlatform, JVMPlatform, NativePlatform).withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.in(file("up"))
.jvmEnablePlugins(NativeImagePlugin)
.jsEnablePlugins(ScalablyTypedConverterPlugin)
.dependsOn(common)
.settings(
name := "chesterup",
Compile / mainClass := Some("chester.up.Main"),
assembly / assemblyJarName := "chesterup.jar",
libraryDependencies ++= Seq(
"com.github.scopt" %%% "scopt" % "4.1.0"
),
commonSettings
)
.jvmSettings(
nativeImageOutput := file("target") / "chesterup",
graalvmSettings,
)

lazy val js = crossProject(JSPlatform).withoutSuffixFor(JSPlatform)
.crossType(CrossType.Full)
.in(file("js"))
Expand Down Expand Up @@ -177,9 +200,7 @@ lazy val lsp = crossProject(JVMPlatform).withoutSuffixFor(JVMPlatform)
commonSettings
)
.jvmSettings(
nativeImageVersion := graalVersion,
nativeImageOptions := nativeImageOption,
nativeImageJvm := graalVm,
graalvmSettings,
)

lazy val root = project
Expand Down

0 comments on commit 6b4d017

Please sign in to comment.