-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
83 lines (78 loc) · 2.35 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
import ApplicationBuild._
val scala3Version = "3.6.3-RC1"
lazy val root = (project in file(".")).
settings(publishSettings("slaq")).
settings(fmppSettings).
settings(
name := "slaq",
description := "A type-safe database API for Scala",
organization := "io.github.godenji",
ThisBuild / sonatypeProfileName := organization.value,
version := "1.0.0-M1",
scalaVersion := scala3Version,
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-feature",
"-language:implicitConversions",
"-language:postfixOps",
"-language:higherKinds",
"-language:existentials",
//"-Wconf:unused:error",
"-Xmigration",
"-Xno-generic-signatures",
"-Yno-kind-polymorphism"
),
libraryDependencies ++= appDeps,
credentials ++= {
val creds = Path.userHome / ".sonatype" / organization.value
if (creds.exists) Seq(Credentials(creds)) else Nil
},
testOptions += Tests.Argument(TestFrameworks.JUnit, "-q", "-v"),
Test / parallelExecution := false,
logBuffered := false
)
.enablePlugins(BuildInfoPlugin)
def publishSettings(projectName: String) = Seq(
pomExtra := pomDetail,
publishMavenStyle := true,
Test / publishArtifact := false,
Compile / packageDoc / publishArtifact := true,
Compile / packageSrc / publishArtifact := true,
pomIncludeRepository := { _ => false },
buildInfoKeys := Seq[BuildInfoKey](version),
buildInfoPackage := projectName,
publishTo := getPublishToRepo.value
)
def getPublishToRepo = Def.setting {
if (isSnapshot.value)
Some(Opts.resolver.sonatypeSnapshots)
else
Some(Opts.resolver.sonatypeStaging)
}
def pomDetail =
<inceptionYear>2014</inceptionYear>
<url>https://github.com/godenji/slaq</url>
<licenses>
<license>
<name>Two-clause BSD-style license</name>
<url>https://github.com/godenji/slaq/blob/master/LICENSE.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:godenji/slaq.git</url>
<connection>scm:git:[email protected]:godenji/slaq</connection>
</scm>
<developers>
<developer>
<id>szeiger</id>
<name>Stefan Zeiger</name>
<url>http://szeiger.de</url>
</developer>
<developer>
<id>godenji</id>
<name>N.S. Cutler</name>
<url>https://github.com/godenji</url>
</developer>
</developers>