Skip to content

Commit

Permalink
Split project into core and cli
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Nov 1, 2023
1 parent 0ba0637 commit 9df9379
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,27 @@ inThisBuild(Seq[Setting[_]](
"SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}"
)
)
)
),
headerLicense := Some(HeaderLicense.Custom("Copyright (C) Lightbend Inc. <https://www.lightbend.com>")),
))

lazy val root = (
project.in(file("."))
aggregate(core)
aggregate(core, cli)
settings(
name := buildName,
publish / skip := true,
publishArtifact := false,
publish := {},
publishLocal := {}
)
)

val AsmVersion = "9.6"

lazy val core = (
project.
lazy val core = project.
settings(
libraryDependencies ++= Seq(
"commons-cli" % "commons-cli" % "1.5.0",
"org.ow2.asm" % "asm" % AsmVersion,
"org.ow2.asm" % "asm-util" % AsmVersion,
"org.scala-lang" % "scalap" % System.getProperty("scalap.version", scalaVersion.value),
Expand All @@ -62,12 +64,23 @@ lazy val core = (
"ch.qos.logback" % "logback-classic" % "1.3.11",
"org.scalatest" %% "scalatest" % "3.2.17" % Test,
),
name := buildName + "-core",
headerLicense := Some(HeaderLicense.Custom("Copyright (C) Lightbend Inc. <https://www.lightbend.com>")),
name := buildName + "-core"
)

lazy val cli = project.
settings(
libraryDependencies ++= Seq(
"commons-cli" % "commons-cli" % "1.5.0",
),
name := buildName + "-cli",
assembly / assemblyMergeStrategy := {
case "rootdoc.txt" => MergeStrategy.discard
case x if x.endsWith("module-info.class") => MergeStrategy.discard
case x => (assembly / assemblyMergeStrategy).value(x)
},
)
)
// cli is not meant to be published
publish / skip := true,
publishArtifact := false,
publish := {},
publishLocal := {}
).dependsOn(core)

0 comments on commit 9df9379

Please sign in to comment.