-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
58 lines (49 loc) · 1.58 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
organization := "com.nthportal"
name := "convert"
description := "A Scala library for handling conversions between types by throwing exceptions or returning Options " +
"containing the results."
val rawVersion = "0.3.0"
isSnapshot := false
version := rawVersion + { if (isSnapshot.value) "-SNAPSHOT" else "" }
scalaVersion := "2.12.3"
crossScalaVersions := Seq(
"2.11.8",
"2.11.11",
"2.12.0",
"2.12.1",
"2.12.2",
"2.12.3"
)
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.1+" % Test
)
autoAPIMappings := true
scalacOptions ++= {
if (isSnapshot.value) Seq()
else scalaVersion.value split '.' map { _.toInt } match {
case Array(2, 11, _) => Seq("-optimize")
case Array(2, 12, patch) if patch <= 2 => Seq("-opt:l:project")
case Array(2, 12, patch) if patch > 2 => Seq("-opt:l:inline")
case _ => Seq()
}
}
publishTo := {
if (isSnapshot.value) Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots")
else None
}
publishMavenStyle := true
licenses := Seq("The Apache License, Version 2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.txt"))
homepage := Some(url("https://github.com/NthPortal/convert"))
pomExtra :=
<scm>
<url>https://github.com/NthPortal/convert</url>
<connection>scm:git:git@github.com:NthPortal/convert.git</connection>
<developerConnection>scm:git:git@github.com:NthPortal/convert.git</developerConnection>
</scm>
<developers>
<developer>
<id>NthPortal</id>
<name>NthPortal</name>
<url>https://github.com/NthPortal</url>
</developer>
</developers>