forked from softprops/assembly-sbt
-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy pathbuild.sbt
More file actions
82 lines (77 loc) · 2.31 KB
/
Copy pathbuild.sbt
File metadata and controls
82 lines (77 loc) · 2.31 KB
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
ThisBuild / version := {
val old = (ThisBuild / version).value
if ((ThisBuild / isSnapshot).value) "2.4.1-SNAPSHOT"
else old
}
ThisBuild / organization := "com.eed3si9n"
def scala212 = "2.12.20"
def scala3 = "3.8.4"
ThisBuild / crossScalaVersions := Seq(scala212, scala3)
ThisBuild / scalaVersion := scala3
lazy val jarjar = "com.eed3si9n.jarjarabrams" %% "jarjar-abrams-core" % "1.17.1"
lazy val root = (project in file("."))
.enablePlugins(SbtPlugin, ContrabandPlugin)
.settings(nocomma {
name := "sbt-assembly"
scalacOptions ++= {
scalaBinaryVersion.value match {
case "3" =>
Nil
case _ =>
Seq(
"-release:8",
"-Xsource:3",
"-Xfuture",
)
}
}
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-Dscalac.patmat.analysisBudget=1024",
)
libraryDependencies += jarjar
addSbtPlugin("com.github.sbt" % "sbt2-compat" % "0.1.0")
(pluginCrossBuild / sbtVersion) := {
scalaBinaryVersion.value match {
case "2.12" => "1.5.8"
case _ => "2.0.0"
}
}
scriptedSbt := {
scalaBinaryVersion.value match {
case "2.12" => "1.10.7"
case _ => "2.0.3"
}
}
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:git@github.com: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(License.MIT)
ThisBuild / pomIncludeRepository := { _ => false }
ThisBuild / publishTo := {
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
val v = (ThisBuild / version).value
if (v.endsWith("SNAPSHOT")) Some("central-snapshots" at centralSnapshots)
else localStaging.value
}
ThisBuild / publishMavenStyle := true