forked from scalapb/protoc-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
87 lines (80 loc) · 2.58 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
import com.typesafe.tools.mima.core._
inThisBuild(
List(
scalaVersion := "2.12.19",
crossScalaVersions := Seq("2.12.19", "2.13.14"),
scalacOptions ++= List("-release", "8"),
javacOptions ++= List("-target", "8", "-source", "8"),
organization := "com.thesamet.scalapb"
)
)
val protobufJava = "com.google.protobuf" % "protobuf-java" % "3.24.4"
val coursierVersion = "2.1.10"
lazy val bridge: Project = project
.in(file("bridge"))
.settings(
name := "protoc-bridge",
scalacOptions ++= (if (scalaVersion.value.startsWith("2.13."))
Seq("-deprecation", "-Xfatal-warnings")
else Nil),
libraryDependencies ++= Seq(
"dev.dirs" % "directories" % "26",
protobufJava % "provided",
protobufJava % "test",
"org.scalatestplus" %% "scalacheck-1-16" % "3.2.14.0" % "test",
"org.scalatest" %% "scalatest" % "3.2.19" % "test",
"org.scalacheck" %% "scalacheck" % "1.18.0" % "test",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0" % "test",
"io.get-coursier" %% "coursier" % coursierVersion % "test"
),
scalacOptions ++= (if (scalaVersion.value.startsWith("2.13."))
Seq("-Wconf:origin=.*JavaConverters.*:s")
else Nil),
mimaPreviousArtifacts := Set(
organization.value %% name.value % "0.9.0-RC2"
),
mimaBinaryIssueFilters ++= Seq(
ProblemFilters
.exclude[DirectMissingMethodProblem]("protocbridge.frontend.*"),
ProblemFilters.exclude[ReversedMissingMethodProblem](
"protocbridge.frontend.PluginFrontend.prepare"
)
)
)
lazy val protocCacheCoursier = project
.in(file("protoc-cache-coursier"))
.dependsOn(bridge)
.settings(
name := "protoc-cache-coursier",
libraryDependencies ++= Seq(
"io.get-coursier" %% "coursier" % coursierVersion
)
)
lazy val protocGen = project
.in(file("protoc-gen"))
.dependsOn(bridge % "compile->compile;test->test")
.settings(
name := "protoc-gen",
libraryDependencies ++= Seq(
protobufJava % "provided"
),
mimaPreviousArtifacts := Set(
organization.value %% name.value % "0.9.0-RC3"
),
mimaBinaryIssueFilters ++= Seq(
ProblemFilters.exclude[Problem]("protocgen.CodeGenRequest.*")
),
Test / unmanagedResourceDirectories ++= (bridge / Test / unmanagedResourceDirectories).value
)
lazy val root = project
.in(file("."))
.settings(
publishArtifact := false,
publish := {},
publishLocal := {}
)
.aggregate(
bridge,
protocGen,
protocCacheCoursier
)