-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathbuild.sbt
90 lines (85 loc) · 2.18 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
val Scala212 = "2.12.20"
val isScala3 = Def.setting(
CrossVersion.partialVersion(scalaVersion.value).exists(_._1 == 3)
)
lazy val buildSettings = Def.settings(
organization := "info.folone",
scalaVersion := Scala212,
crossScalaVersions := Seq(Scala212, "2.13.15", "3.3.4"),
(Compile / doc / scalacOptions) ++= {
val base = (LocalRootProject / baseDirectory).value.getAbsolutePath
if (isScala3.value) {
Nil
} else {
val hash = sys.process.Process("git rev-parse HEAD").lineStream_!.head
Seq(
"-sourcepath",
base,
"-doc-source-url",
"https://github.com/folone/poi.scala/tree/" + hash + "€{FILE_PATH}.scala"
)
}
},
scalacOptions := Seq(
"-feature",
"-encoding",
"UTF-8",
"-deprecation",
"-unchecked"
),
scalacOptions ++= {
if (isScala3.value) {
Seq()
} else {
Seq(
"-explaintypes"
)
}
},
Compile / parallelExecution := true
)
val scalazVersion = "7.3.8"
val poiVersion = "5.4.0"
lazy val standardSettings = Def.settings(
buildSettings,
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
name := "poi-scala",
Test / fork := true,
libraryDependencies ++= {
Seq(
"org.apache.poi" % "poi" % poiVersion,
"org.apache.poi" % "poi-ooxml" % poiVersion,
"org.scalaz" %% "scalaz-effect" % scalazVersion,
"org.scalaz" %% "scalaz-scalacheck-binding" % scalazVersion % "test",
"org.specs2" %% "specs2-scalacheck" % "4.20.9" % "test"
)
},
Test / publishArtifact := false,
pomExtra := (
<url>https://github.com/folone/poi.scala</url>
<developers>
{
Seq(
("folone", "George Leontiev"),
("fedgehog", "Maxim Fedorov"),
("Michael Rans", "Michael Rans"),
("daneko", "Kouichi Akatsuka"),
("rintcius", "Rintcius Blok"),
("xuwei-k", "Kenji Yoshida")
).map { case (id, name) =>
<developer>
<id>{id}</id>
<name>{name}</name>
<url>http://github.com/{id}</url>
</developer>
}
}
</developers>
)
)
lazy val poi = Project(
id = "poi",
base = file(".")
).settings(
standardSettings
)