-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
73 lines (64 loc) · 2.28 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
import scala.xml.{Node => XmlNode, NodeSeq => XmlNodeSeq, _}
import scala.xml.transform.{RewriteRule, RuleTransformer}
inThisBuild(
List(
organization := "io.github.mr-tolmach",
homepage := Some(url("https://github.com/mr-tolmach/raf")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local",
versionScheme := Some("early-semver"),
developers := List(
Developer(
"mr-tolmach",
"Daniil Tolmachev",
"mister.tolmach@gmail.com",
url("https://github.com/mr-tolmach")
)
),
scalaVersion := Versions.defaultScalaVersion,
crossScalaVersions := Seq("2.12.17", "2.13.10", Versions.defaultScalaVersion),
Test / logBuffered := false,
// skip dependency elements with a test scope
pomPostProcess := { (node: XmlNode) =>
new RuleTransformer(new RewriteRule {
private def isTestScoped(e: Elem): Boolean =
e.label == "dependency" && e.child.exists(child => child.label == "scope" && child.text == "test")
override def transform(node: XmlNode): XmlNodeSeq = node match {
case e: Elem if isTestScoped(e) =>
val dependencyLine = Seq("groupId", "artifactId", "version", "scope")
.map { label =>
e.child.filter(_.label == label).flatMap(_.text).mkString("\"", "", "\"")
}
.mkString(" % ")
sLog.value.info(s"""Dependency $dependencyLine has been omitted""")
XmlNodeSeq.Empty
case _ => node
}
}).transform(node).head
}
)
)
resolvers ++= Seq(
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
)
lazy val metadata = (project in file("metadata"))
.settings(
moduleName := "raf-metadata",
publish / skip := false,
Dependencies.metadata
)
lazy val generators = (project in file("generators"))
.settings(
moduleName := "raf-generators",
publish / skip := false,
Dependencies.generators
)
.dependsOn(metadata)
lazy val root = (project in file("."))
.settings(
name := "raf",
publish / skip := true,
publishArtifact := false
)
.aggregate(metadata, generators)