This repository has been archived by the owner on Oct 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
78 lines (73 loc) · 2.67 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
// Reload build.sbt on changes
Global / onChangedBuildSource := ReloadOnSourceChanges
val AIRFRAME_VERSION = sys.env.getOrElse("AIRFRAME_VERSION", "21.9.0")
val AIRSPEC_VERSION = "21.9.0"
val SCALA_2_12 = "2.12.14"
ThisBuild / organization := "org.wvlet.airframe"
// Use dynamic snapshot version strings for non tagged versions
ThisBuild / dynverSonatypeSnapshots := true
// Use coursier friendly version separator
ThisBuild / dynverSeparator := "-"
ThisBuild / resolvers += Resolver.sonatypeRepo("snapshots")
val buildSettings = Seq[Setting[_]](
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")),
homepage := Some(url("https://wvlet.org/airframe")),
scmInfo := Some(
ScmInfo(
browseUrl = url("https://github.com/wvlet/sbt-airframe"),
connection = "scm:[email protected]:wvlet/sbt-airframe.git"
)
),
developers := List(
Developer(id = "leo", name = "Taro L. Saito", email = "[email protected]", url = url("http://xerial.org/leo"))
),
sonatypeProfileName := "org.wvlet",
crossPaths := true,
publishMavenStyle := true,
publishTo := sonatypePublishToBundle.value,
javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
scalacOptions ++= Seq(
"-feature",
"-deprecation"
),
testFrameworks += new TestFramework("wvlet.airspec.Framework"),
libraryDependencies ++= Seq(
"org.wvlet.airframe" %% "airspec" % AIRSPEC_VERSION % Test
)
)
// sbt plugin
lazy val sbtAirframe =
project
.in(file("."))
.enablePlugins(SbtPlugin, BuildInfoPlugin)
.settings(
buildSettings,
buildInfoKeys ++= Seq[BuildInfoKey](
name,
version,
"airframeVersion" -> AIRFRAME_VERSION,
scalaVersion,
sbtVersion
),
buildInfoPackage := "wvlet.airframe.sbt",
name := "sbt-airframe",
description := "sbt plugin for helping programming with Airframe",
scalaVersion := SCALA_2_12,
libraryDependencies ++= Seq(
"io.get-coursier" %% "coursier" % "2.0.16",
"org.apache.commons" % "commons-compress" % "1.21",
"org.wvlet.airframe" %% "airframe-control" % AIRFRAME_VERSION,
"org.wvlet.airframe" %% "airframe-codec" % AIRFRAME_VERSION,
"org.wvlet.airframe" %% "airframe-log" % AIRFRAME_VERSION,
"org.wvlet.airframe" %% "airframe-http-codegen" % AIRFRAME_VERSION % Test
),
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq(
"-Xmx1024M",
"-Dplugin.version=" + version.value,
"-Dairframe.version=" + AIRFRAME_VERSION
)
},
scriptedBufferLog := false
)