This repository was archived by the owner on Feb 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbuild.sbt
64 lines (61 loc) · 2.32 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
lazy val sharedSettings = Def.settings(
organization := "dev.dirs",
managedScalaInstance := false,
crossPaths := false,
version := "20",
homepage := Some(url("https://github.com/dirs-dev/directories-jvm")),
licenses := Seq("Mozilla Public License 2.0" -> url("https://opensource.org/licenses/MPL-2.0")),
fork := true,
// The javaHome setting can be removed if building against the latest installed version of Java is acceptable.
// Running the tests requires removing the setting.
// It can also be changed to point to a different Java version.
// javaHome := Some(file("/home/soc/apps/zulu6.19.0.1-jdk6.0.103-linux_x64/")),
/*
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
*/
pomIncludeRepository := { _ => false },
pomExtra :=
<scm>
<url>git@github.com:dirs-dev/directories-jvm.git</url>
<connection>scm:git:git@github.com:dirs-dev/directories-jvm.git</connection>
</scm>
<developers>
<developer>
<id>soc</id>
<name>Simon Ochsenreither</name>
<url>https://github.com/soc</url>
<roles>
<role>Project Lead</role>
</roles>
</developer>
</developers>
)
def automaticModuleName(name: String) = Def.settings(
packageOptions in (Compile, packageBin) += {
import java.util.jar.{Attributes, Manifest}
val manifest = new Manifest
manifest.getMainAttributes.put(new Attributes.Name("Automatic-Module-Name"), name)
Package.JarManifest(manifest)
}
)
lazy val core = project
.settings(
sharedSettings,
name := "directories",
libraryDependencies += "junit" % "junit" % "4.13" % Test,
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
testOptions in Test := Seq(Tests.Argument(TestFrameworks.JUnit, "-a")),
automaticModuleName("dev.dirs")
)
lazy val cli = project
.dependsOn(core)
.settings(
sharedSettings,
name := "directories-cli",
libraryDependencies += "info.picocli" % "picocli" % "4.4.0",
automaticModuleName("dev.dirs.cli")
)