-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
58 lines (51 loc) · 2.26 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
lazy val scala213 = "2.13.10"
lazy val scala212 = "2.12.17"
lazy val scala213Options = Seq(
"-Wconf:cat=unused-imports:info",
"-Wconf:cat=unused-locals:info",
"-Wconf:cat=unused-params:info",
"-Ywarn-macros:after",
"-Ymacro-annotations",
"-P:semanticdb:synthetics:on"
)
// Reload Sbt on changes to sbt or dependencies
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / startYear := Some(2021)
ThisBuild / version := sys.env.get("SCALA_BBROWNSOUND_SCHEMA_VERSION").getOrElse(throw new Exception("SCALA_BBROWNSOUND_SCHEMA_VERSION not set!"))
ThisBuild / organization := "com.bbrownsound"
ThisBuild / organizationName := "Bbrownsound"
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.5.0"
ThisBuild / semanticdbEnabled := false
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
ThisBuild / scalaVersion := scala213
ThisBuild / crossScalaVersions := List(scala213, scala212)
ThisBuild / versionScheme := Some("early-semver")
(Universal / maintainer) := "brandon@bbrownsound.com"
lazy val baseSettings: Seq[Setting[_]] = Seq(
Compile / scalacOptions ++= scala213Options
)
lazy val root = (project in file("."))
.enablePlugins(BuildInfoPlugin, JavaAppPackaging, UniversalPlugin)
.settings(
name := "protobuf-models",
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := organization.value,
libraryDependencies ++= Dependencies.protobufDeps,
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
)
.settings(undeclaredCompileDependenciesFilter -= moduleFilter("org.scala-lang"))
.settings(undeclaredCompileDependenciesFilter -= moduleFilter("org.scala-lang.modules"))
addCommandAlias("format", ";scalafmtAll ;scalafmtSbt ;scalafixAll ;undeclaredCompileDependenciesTest")
addCommandAlias(
"formatCheck",
";scalafmtCheck ;scalafmtSbtCheck ;scalafixAll --check ;undeclaredCompileDependenciesTest"
)
publishTo := Some(
"Artifactory Realm" at "https://Bbrownsound.jfrog.io/artifactory/ssc-sbt-dev-local;build.timestamp=" + new java.util.Date().getTime
)
credentials += Credentials(
"Artifactory Realm",
"Bbrownsound.jfrog.io",
sys.env.get("JFROG_USER").getOrElse("JFROG_USER NOT SET"),
sys.env.get("JFROG_PASSWORD").getOrElse("JFROG_TOKEN NOT SET"),
)