Skip to content

Commit 94af767

Browse files
committed
update build, add publishing directives
1 parent 11782d4 commit 94af767

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

build.sbt

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ lazy val Version = "0.1.4"
22
lazy val Name = "introprog"
33

44
name := Name
5-
organization := "se.lth.cs"
65
version := Version
76
scalaVersion := "2.12.6"
87
fork in (Compile, console) := true
@@ -33,3 +32,38 @@ scalacOptions in (Compile, doc) ++= Seq(
3332
"-doc-root-content", (baseDirectory in ThisBuild).value.toString + "/src/rootdoc.txt",
3433
"-doc-source-url", s"https://github.com/lunduniversity/introprog-scalalib/tree/master€{FILE_PATH}.scala"
3534
)
35+
36+
// Below enables publishing to central.sonatype.org according to
37+
// https://www.scala-sbt.org/release/docs/Using-Sonatype.html
38+
39+
ThisBuild / organization := "se.lth.cs"
40+
ThisBuild / organizationName := "LTH"
41+
ThisBuild / organizationHomepage := Some(url("http://cs.lth.se/"))
42+
43+
ThisBuild / scmInfo := Some(
44+
ScmInfo(
45+
url("https://github.com/lunduniversity/introprog-scalalib"),
46+
"scm:git@github.com:lunduniversity/introprog-scalalib.git"
47+
)
48+
)
49+
ThisBuild / developers := List(
50+
Developer(
51+
id = "bjornregnell",
52+
name = "Bjorn Regnell",
53+
email = "bjorn.regnell@cs.lth.se",
54+
url = url("http://cs.lth.se/bjornregnell")
55+
)
56+
)
57+
58+
ThisBuild / description := "Scala utilities for introductory Computer Science teaching."
59+
ThisBuild / licenses := List("BSD 2-Clause" -> new URL("https://opensource.org/licenses/BSD-2-Clause"))
60+
ThisBuild / homepage := Some(url("https://github.com/lunduniversity/introprog-scalalib"))
61+
62+
// Remove all additional repository other than Maven Central from POM
63+
ThisBuild / pomIncludeRepository := { _ => false }
64+
ThisBuild / publishTo := {
65+
val nexus = "https://oss.sonatype.org/"
66+
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
67+
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
68+
}
69+
ThisBuild / publishMavenStyle := true

0 commit comments

Comments
 (0)