This repository has been archived by the owner. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
63 lines (55 loc) · 1.98 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
import Dependencies._
import xerial.sbt.Sonatype._
ThisBuild / scalaVersion := "2.12.8"
ThisBuild / organization := "com.github.fomkin"
val unusedRepo = Some(Resolver.file("Unused transient repository", file("target/unusedrepo")))
val publishSettings = Seq(
publishTo := sonatypePublishTo.value,
publishArtifact in Test := false,
publishMavenStyle := true,
licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
//headerLicense := Some(HeaderLicense.ALv2("2017-2019", "Aleksey Fomkin")),
//excludeFilter.in(headerSources) := HiddenFileFilter || "IntStringMap.scala",
sonatypeProjectHosting := Some(GitHubHosting("fomkin", "zhukov", "Aleksey Fomkin", "aleksey.fomkin@gmail.com"))
)
val dontPublishSettings = Seq(
publish := {},
publishTo := unusedRepo,
publishArtifact := false
// headerLicense := None
)
lazy val protobuf = project
.in(file("protobuf"))
.enablePlugins(GitVersioning)
.settings(publishSettings: _*)
.settings(
name := "zhukov-protobuf"
)
lazy val core = project
.in(file("core"))
.enablePlugins(GitVersioning)
.settings(publishSettings: _*)
.settings(
name := "zhukov-core"
)
.dependsOn(protobuf)
lazy val derivation = project
.in(file("derivation"))
.enablePlugins(GitVersioning)
.settings(publishSettings: _*)
.settings(Project.inConfig(Test)(sbtprotoc.ProtocPlugin.protobufConfigSettings):_*)
.settings(
name := "zhukov-derivation",
testFrameworks += new TestFramework("minitest.runner.Framework"),
PB.targets in Test := Seq(scalapb.gen() -> (sourceManaged in Test).value),
PB.targets in Compile := Nil,
PB.protoSources in Test := Seq(file("derivation/src/test/protobuf")),
libraryDependencies := Seq(
scalaPb % Test, minitest, // testing
macroCompat, macroParadise, scalaCompiler(scalaVersion.value) // macros
)
)
.dependsOn(core)
lazy val root = (project in file("."))
.settings(dontPublishSettings:_* )
.aggregate(protobuf, core, derivation)