forked from benlings/scala-guice
-
Notifications
You must be signed in to change notification settings - Fork 44
/
build.sbt
82 lines (68 loc) · 2.3 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name := "Scala Guice"
description := "Scala syntax for Guice"
organization := "net.codingwell"
version := "7.0.0"
versionScheme := Some("pvp")
licenses := Seq("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt"))
homepage := Some(url("https://github.com/codingwell/scala-guice"))
libraryDependencies ++= Seq(
"com.google.inject" % "guice" % "7.0.0",
"org.scalatest" %% "scalatest" % "3.2.9" % "test",
"com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile"
)
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) => Seq(
"org.scala-lang.modules" %% "scala-collection-compat" % "2.1.2",
"org.scala-lang" % "scala-reflect" % scalaVersion.value
)
case _ => Seq.empty
}
}
autoAPIMappings := true
val scala3 = "3.2.2"
scalaVersion := scala3
crossScalaVersions := Seq("2.11.12", "2.12.17", "2.13.10", scala3)
scalacOptions := Seq("-unchecked", "-deprecation", "-feature")
Compile / unmanagedSourceDirectories += {
val sourceDir = (Compile / sourceDirectory).value
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n >= 13 => sourceDir / "scala-2.13+"
case Some((3, _)) => sourceDir / "scala-2.13+"
case _ => sourceDir / "scala-2.12-"
}
}
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")
}
pomExtra :=
<scm>
<connection>scm:git:https://github.com/codingwell/scala-guice.git</connection>
<developerConnection>scm:git:ssh://git@github.com:codingwell/scala-guice.git</developerConnection>
<url>https://github.com/codingwell/scala-guice</url>
</scm>
<developers>
<developer>
<id>tsuckow</id>
<name>Thomas Suckow</name>
<email>tsuckow@gmail.com</email>
<url>http://codingwell.net</url>
<organization>Coding Well</organization>
<organizationUrl>http://codingwell.net</organizationUrl>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>
<contributors>
<contributor>
<name>Ben Lings</name>
<roles>
<role>creator</role>
</roles>
</contributor>
</contributors>