forked from sbt/sbt-dynver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
81 lines (74 loc) · 2.58 KB
/
build.sbt
File metadata and controls
81 lines (74 loc) · 2.58 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
val dynverRoot = project.in(file("."))
aggregateProjects(dynverLib, sbtdynver)
lazy val scala2_12 = "2.12.21"
lazy val scala2_13 = "2.13.18"
lazy val scala3 = "3.3.7"
lazy val scala3sbt = "3.8.3"
lazy val scalacOptions212 = Seq(
"-release:8",
"-Xlint",
"-Xfuture",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Yno-adapted-args",
)
inThisBuild(List(
scalaVersion := scala2_12,
organization := "com.github.sbt",
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")),
description := "An sbt plugin to dynamically set your version from git",
developers := List(Developer("dwijnand", "Dale Wijnand", "dale wijnand gmail com", url("https://dwijnand.com"))),
startYear := Some(2016),
homepage := scmInfo.value map (_.browseUrl),
scmInfo := Some(ScmInfo(url("https://github.com/sbt/sbt-dynver"), "scm:git:git@github.com:sbt/sbt-dynver.git")),
dynverSonatypeSnapshots := true,
scalacOptions ++= Seq(
"-encoding",
"utf8",
"-deprecation",
"-feature",
"-unchecked",
),
Test / fork := false,
Test / logBuffered := false,
Test / parallelExecution := true,
))
val dynverLib = LocalProject("dynver")
val dynver = project.settings(
libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.3.202401111512-r" % Test,
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.19.0" % Test,
publishSettings,
crossScalaVersions := Seq(scala2_12, scala2_13, scala3),
scripted := (()),
scalacOptions ++= {
scalaBinaryVersion.value match {
case "3" | "2.13" =>
Nil
case _ =>
scalacOptions212
}
}
)
val sbtdynver = project.dependsOn(dynverLib).enablePlugins(SbtPlugin).settings(
name := "sbt-dynver",
scriptedBufferLog := true,
scriptedDependencies := Seq(dynver / publishLocal, publishLocal).dependOn.value,
scriptedLaunchOpts += s"-Dplugin.version=${version.value}",
scriptedLaunchOpts += s"-Dsbt.boot.directory=${file(sys.props("user.home")) / ".sbt" / "boot"}",
crossScalaVersions := Seq(scala2_12, scala3sbt),
(pluginCrossBuild / sbtVersion) := {
scalaBinaryVersion.value match {
case "2.12" => "1.3.0"
case _ => "2.0.0-RC10"
}
},
publishSettings,
)
lazy val publishSettings = Def.settings(
MimaSettings.mimaSettings,
)
crossScalaVersions := Nil
mimaPreviousArtifacts := Set.empty
publish / skip := true
Global / cancelable := true