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