forked from softprops/assembly-sbt
-
Notifications
You must be signed in to change notification settings - Fork 223
/
build.sbt
79 lines (74 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
ThisBuild / version := {
val old = (ThisBuild / version).value
if ((ThisBuild / isSnapshot).value) "2.1.2-SNAPSHOT"
else old
}
ThisBuild / organization := "com.eed3si9n"
def scala212 = "2.12.20"
def scala3 = "3.6.2"
ThisBuild / crossScalaVersions := Seq(scala212, scala3)
ThisBuild / scalaVersion := scala3
lazy val jarjar = "com.eed3si9n.jarjarabrams" %% "jarjar-abrams-core" % "1.14.0"
lazy val root = (project in file("."))
.enablePlugins(SbtPlugin, ContrabandPlugin)
.settings(nocomma {
name := "sbt-assembly"
scalacOptions ++= {
scalaBinaryVersion.value match {
case "3" =>
Nil
case _ =>
Seq(
"-Xsource:3",
"-Xfuture",
)
}
}
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-Dscalac.patmat.analysisBudget=1024",
)
libraryDependencies += jarjar.cross(CrossVersion.for3Use2_13)
(pluginCrossBuild / sbtVersion) := {
scalaBinaryVersion.value match {
case "2.12" => "1.5.8"
case _ => "2.0.0-M3"
}
}
scriptedSbt := {
scalaBinaryVersion.value match {
case "2.12" => "1.10.7"
case _ => "2.0.0-M3"
}
}
Compile / generateContrabands / sourceManaged := baseDirectory.value / "src" / "main" / "scala"
scriptedLaunchOpts := { scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
}
scriptedBufferLog := false
})
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/sbt/sbt-assembly"),
"scm:[email protected]:sbt/sbt-assembly.git"
)
)
ThisBuild / developers := List(
Developer(
id = "eed3si9n",
name = "Eugene Yokota",
email = "@eed3si9n",
url = url("https://eed3si9n.com/")
),
)
ThisBuild / description := "sbt plugin to create a single über jar"
ThisBuild / homepage := Some(url("https://github.com/sbt/sbt-assembly"))
ThisBuild / licenses := Seq("MIT" -> url("https://github.com/sbt/sbt-assembly/blob/master/LICENSE"))
ThisBuild / pomIncludeRepository := { _ => false }
ThisBuild / 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")
}
ThisBuild / publishMavenStyle := true