-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
137 lines (114 loc) · 3.93 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
//lazy val scala213 = "2.13.13"
lazy val scala3 = "3.4.3"
lazy val scalaVer = scala3
lazy val supportedScalaVersions = List(scala3)
// lazy val supportedScalaVersions = List(scalaVer)
javacOptions ++= Seq("-source", "11", "-target", "11")
//enablePlugins(ScalaNativePlugin)
//nativeLinkStubs := true
//ThisBuild / envFileName := "dev.env" // sbt-dotenv plugin gets build environment here
ThisBuild / scalaVersion := scalaVer
ThisBuild / version := "0.10.19"
ThisBuild / versionScheme := Some("semver-spec")
ThisBuild / organization := "org.vastblue"
ThisBuild / organizationName := "vastblue.org"
ThisBuild / organizationHomepage := Some(url("https://vastblue.org"))
//cancelable in Global := true
parallelExecution := false
Compile / packageBin / packageOptions +=
Package.ManifestAttributes(java.util.jar.Attributes.Name.CLASS_PATH -> "")
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/philwalk/pallet"),
"scm:[email protected]:philwalk/pallet.git"
)
)
ThisBuild / developers.withRank(KeyRanks.Invisible) := List(
Developer(
id = "philwalk",
name = "Phil Walker",
email = "[email protected]",
url = url("https://github.com/philwalk")
)
)
// Remove all additional repository other than Maven Central from POM
ThisBuild / publishTo := {
// For accounts created after Feb 2021:
val nexus = "https://s01.oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
ThisBuild / publishMavenStyle.withRank(KeyRanks.Invisible) := true
// For all Sonatype accounts created on or after February 2021
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
resolvers += Resolver.mavenLocal
publishTo := sonatypePublishToBundle.value
ThisBuild / crossScalaVersions := supportedScalaVersions
Compile / packageBin / packageOptions +=
Package.ManifestAttributes(java.util.jar.Attributes.Name.CLASS_PATH -> "")
lazy val root = (project in file(".")).
enablePlugins(BuildInfoPlugin).
settings(
crossScalaVersions := supportedScalaVersions,
name := "pallet",
description := "scala scripting support",
// mainClass := Some("vast.apps.ShowSysProps"),
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := "pallet", // available as "import pallet.BuildInfo"
)
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
"org.vastblue" % "unifile_3" % "0.3.9",
"org.simpleflatmapper" % "sfm-csv" % "9.0.2",
"com.github.tototoshi" %% "scala-csv" % "2.0.0",
"io.github.chronoscala" %% "chronoscala" % "2.0.10",
)
/*
* build.sbt
* SemanticDB is enabled for all sub-projects via ThisBuild scope.
* https://www.scala-sbt.org/1.x/docs/sbt-1.3-Release-Notes.html#SemanticDB+support
*/
inThisBuild(
List(
scalaVersion := scalaVersion.value, // 2.13.12, or 3.x
// semanticdbEnabled := true // enable SemanticDB
// semanticdbVersion := scalafixSemanticdb.revision // only required for Scala 2.x
)
)
scalacOptions := {
Seq(
// "-Xmaxerrs", "10",
"-encoding",
"utf-8",
"-explaintypes",
"-language:existentials",
"-language:experimental.macros",
"-language:higherKinds",
"-language:implicitConversions",
"-deprecation",
// Linting options
"-unchecked"
)
}
scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n >= 13 =>
Seq(
"-Ytasty-reader",
"-Xsource:3",
"-Xmaxerrs",
"10",
"-Yscala3-implicit-resolution",
"-language:implicitConversions",
)
case _ =>
Nil
})
// key identifier, otherwise this field is ignored; passwords supplied by pinentry
credentials += Credentials(
"GnuPG Key ID",
"gpg",
"1CF370113B7EE5A327DD25E7B5D88C95FC9CB6CA", // key identifier
"ignored",
)