This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
89 lines (82 loc) · 2.95 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
83
84
85
86
87
88
89
import _root_.io.github.davidgregory084.DevMode
// General info
val username = "RustedBones"
val repo = "akka-http-thrift"
ThisBuild / tpolecatDefaultOptionsMode := DevMode
ThisBuild / tpolecatDevModeOptions ~= { opts =>
opts.filterNot(
Set(
ScalacOptions.warnValueDiscard,
ScalacOptions.privateWarnValueDiscard
)
)
}
// for sbt-github-actions
ThisBuild / crossScalaVersions := Seq("2.13.8", "2.12.16")
ThisBuild / githubWorkflowBuild := Seq(
WorkflowStep.Sbt(name = Some("Check project"), commands = List("scalafmtCheckAll", "headerCheckAll")),
WorkflowStep.Sbt(name = Some("Build project"), commands = List("test"))
)
ThisBuild / githubWorkflowTargetBranches := Seq("master")
ThisBuild / githubWorkflowPublishTargetBranches := Seq.empty
lazy val commonSettings = Seq(
organization := "fr.davit",
organizationName := "Michel Davit",
crossScalaVersions := (ThisBuild / crossScalaVersions).value,
scalaVersion := crossScalaVersions.value.head,
homepage := Some(url(s"https://github.com/$username/$repo")),
licenses += ("Apache-2.0", new URL("https://www.apache.org/licenses/LICENSE-2.0.txt")),
startYear := Some(2019),
scmInfo := Some(ScmInfo(url(s"https://github.com/$username/$repo"), s"[email protected]:$username/$repo.git")),
developers := List(
Developer(
id = s"$username",
name = "Michel Davit",
email = "[email protected]",
url = url(s"https://github.com/$username")
)
),
publishMavenStyle := true,
Test / publishArtifact := false,
publishTo := Some(if (isSnapshot.value) Opts.resolver.sonatypeSnapshots else Opts.resolver.sonatypeStaging),
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
credentials ++= (for {
username <- sys.env.get("SONATYPE_USERNAME")
password <- sys.env.get("SONATYPE_PASSWORD")
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)).toSeq
)
lazy val `akka-http-thrift-parent` = (project in file("."))
.disablePlugins(ScroogeSBT)
.aggregate(`akka-http-thrift`, `akka-http-thrift-scrooge`)
.settings(commonSettings: _*)
.settings(
publish / skip := true
)
lazy val `akka-http-thrift` = (project in file("thrift"))
.disablePlugins(ScroogeSBT)
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
Dependencies.akkaHttp,
Dependencies.thrift,
Dependencies.Provided.akkaStream,
Dependencies.Provided.logback,
Dependencies.Test.akkaTestkit,
Dependencies.Test.akkaHttpTestkit,
Dependencies.Test.scalaTest
)
)
lazy val `akka-http-thrift-scrooge` = (project in file("scrooge"))
.dependsOn(`akka-http-thrift`)
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
Dependencies.scrooge,
Dependencies.Provided.akkaStream,
Dependencies.Provided.logback,
Dependencies.Test.akkaTestkit,
Dependencies.Test.akkaHttpTestkit,
Dependencies.Test.scalaTest
)
)