forked from apache/pekko-sbt-paradox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
67 lines (60 loc) · 2.23 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
scalaVersion := "2.13.10"
licenses += "Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")
lazy val apacheBaseRepo = "repository.apache.org"
def apacheNexusCredentials: Seq[Credentials] =
(sys.env.get("NEXUS_USER"), sys.env.get("NEXUS_PW")) match {
case (Some(user), Some(password)) =>
Seq(Credentials("Sonatype Nexus Repository Manager", apacheBaseRepo, user, password))
case _ =>
Seq.empty
}
lazy val publishSettings = Seq(
credentials ++= apacheNexusCredentials,
organizationName := "Apache Software Foundation",
organizationHomepage := Some(url("https://www.apache.org")),
sonatypeCredentialHost := apacheBaseRepo,
sonatypeProfileName := "org.apache.pekko",
startYear := Some(2022),
developers := List(
Developer(
"pekko-contributors",
"Apache Pekko Contributors",
url("https://github.com/apache/incubator-pekko/graphs/contributors"))),
publishMavenStyle := true,
pomIncludeRepository := (_ => false))
lazy val pekkoParadox = project
.in(file("."))
.settings(
publish / skip := true)
.aggregate(pekkoTheme, pekkoPlugin)
lazy val pekkoTheme = project
.in(file("theme"))
.enablePlugins(ParadoxThemePlugin)
.settings(
organization := "org.apache.pekko",
name := "pekko-theme-paradox")
.settings(publishSettings)
lazy val pekkoPlugin = project
.in(file("plugin"))
.enablePlugins(SbtPlugin)
.settings(
sbtPlugin := true,
organization := "org.apache.pekko",
name := "pekko-sbt-paradox",
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
},
scriptedBufferLog := false,
addSbtPlugin(
// When updating the sbt-paradox version,
// remember to also update project/plugins.sbt
"com.lightbend.paradox" % "sbt-paradox" % "0.10.3"),
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox-apidoc" % "1.0.0"),
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox-project-info" % "3.0.0"),
Compile / resourceGenerators += Def.task {
val file = (Compile / resourceManaged).value / "pekko-paradox.properties"
IO.write(file, s"pekko.paradox.version=${version.value}")
Seq(file)
}).settings(publishSettings)