-
Notifications
You must be signed in to change notification settings - Fork 28
/
build.sbt
122 lines (95 loc) · 3.97 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
name := "solrs"
description := "A solr client for scala, providing a query interface like SolrJ, just asynchronously / non-blocking"
homepage := Some(url("https://github.com/inoio/solrs"))
organization := "io.ino"
// version is defined in version.sbt
scmInfo := Some(ScmInfo(url("https://github.com/inoio/solrs"), "[email protected]:inoio/solrs.git"))
licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.html"))
scalaVersion := "3.4.3"
// Remember: also update scala versions in .travis.yml!
crossScalaVersions := Seq("2.12.20", "2.13.15", "3.4.3")
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-language:postfixOps"
)
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint")
initialize := {
val _ = initialize.value
val javaVersion = sys.props("java.specification.version")
if (javaVersion != "1.8" && javaVersion.toDouble < 9)
sys.error(s"At least java 8 is required for this project. Running: $javaVersion")
}
resolvers ++= Seq(
"Restlet Repositories" at "https://maven.restlet.org"
)
val solrVersion = "9.5.0"
val slf4jVersion = "2.0.16"
libraryDependencies ++= Seq(
"org.apache.solr" % "solr-solrj" % solrVersion,
"org.asynchttpclient" % "async-http-client" % "2.12.3",
"org.scala-lang.modules" %% "scala-xml" % "2.3.0",
"org.scala-lang.modules" %% "scala-java8-compat"% "1.0.2",
"io.dropwizard.metrics" % "metrics-core" % "4.2.28" % "optional",
"org.slf4j" % "slf4j-api" % slf4jVersion,
"org.slf4j" % "slf4j-simple" % slf4jVersion % "test",
"org.scalatest" %% "scalatest" % "3.2.19" % "test",
"org.scalatestplus" %% "mockito-4-6" % "3.2.15.0" % "test",
"org.scalatestplus" %% "junit-4-13" % "3.2.19.0" % "test",
"com.github.sbt" % "junit-interface" % "0.13.3" % Test,
"org.hamcrest" % "hamcrest-library" % "3.0" % "test",
"dev.zio" %% "izumi-reflect" % "2.3.10" % Test,
"org.apache.solr" % "solr-test-framework" % solrVersion % "test" excludeAll(ExclusionRule(organization = "org.apache.logging.log4j")),
"com.twitter" %% "util-core" % "24.2.0" % "optional"
)
excludeDependencies ++= (
if (scalaVersion.value.startsWith("2.12")) Seq()
else Seq("org.scala-lang.modules" %% "scala-collection-compat")
)
// Fork tests so that SolrRunner's shutdown hook kicks in
Test / fork := true
enablePlugins(ParadoxSitePlugin)
Paradox / sourceDirectory := sourceDirectory.value / "main" / "paradox"
// prevent linter warning "there's a key that's not used by any other settings/tasks"
Global / excludeLintKeys += Paradox / sourceDirectory
enablePlugins(GhpagesPlugin)
git.remoteRepo := scmInfo.value.get.connection
enablePlugins(ParadoxPlugin)
paradoxTheme := Some(builtinParadoxTheme("generic"))
paradoxGroups := Map("Language" -> Seq("Scala", "Java"))
/*
// paradoxGroups switcher not aligned: https://github.com/jonas/paradox-material-theme/issues/11
enablePlugins(ParadoxMaterialThemePlugin)
paradoxMaterialTheme in Compile := {
ParadoxMaterialTheme()
.withoutSearch()
.withColor("indigo", "orange")
.withRepository(uri("https://github.com/inoio/solrs"))
}
*/
// Publish settings
ThisBuild / publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
ThisBuild / versionScheme := Some("early-semver")
publishMavenStyle := true
Test / publishArtifact := false
// enable publishing the jar produced by `test:package`
Test / packageBin / publishArtifact := true
pomIncludeRepository := { _ => false }
pomExtra := (
<developers>
<developer>
<id>martin.grotzke</id>
<name>Martin Grotzke</name>
<url>https://github.com/magro</url>
</developer>
</developers>)