/
build.sbt
134 lines (116 loc) · 3.89 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
import org.scalajs.sbtplugin.ScalaJSPlugin
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
import scalariform.formatter.preferences._
import com.typesafe.sbt.SbtScalariform
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
val commonSettings = Seq(
version := "1.3.0",
scalaVersion := "2.12.3",
name := "chelona",
organization := "com.github.jupfu",
homepage := Some(new URL("http://github.com/JuPfu/chelona")),
description := "W3C RDF 1.1 Turtle-, TriG-, Quad- and NTriples-Parser",
startYear := Some(2014),
licenses := Seq("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt")),
test in assembly := {},
javacOptions ++= Seq(
"-encoding", "UTF-8",
"-source", "1.8",
"-target", "1.8",
"-Xlint:unchecked",
"-Xlint:deprecation"),
scalacOptions ++= List(
"-encoding",
"UTF-8",
"-feature",
"-unchecked",
"-deprecation",
"-Xlint",
"-Ypartial-unification",
"-opt:l:method",
"-language:_",
"-target:jvm-1.8"))
val formattingSettings = scalariformSettings ++ Seq(
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(RewriteArrowSymbols, true)
.setPreference(AlignParameters, true)
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentClassDeclaration, true))
/////////////////////// PROJECTS /////////////////////////
resolvers += "Sonatype OSS Releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
resolvers += Resolver.sonatypeRepo("public")
resolvers += Resolver.typesafeRepo("releases")
parallelExecution in Test := false
SbtScalariform.scalariformSettings
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(RewriteArrowSymbols, true)
.setPreference(AlignParameters, true)
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentClassDeclaration, true)
lazy val chelona = crossProject.in(file("."))
.settings(
libraryDependencies ++=
Seq(
"org.parboiled" %%% "parboiled" % "2.1.4",
"com.chuusai" %%% "shapeless" % "2.3.2",
"org.scalatest" %%% "scalatest" % "3.0.1" % Test
)
)
.jvmSettings(
libraryDependencies ++=
Seq(
"com.github.scopt" % "scopt_2.12" % "3.6.0"
)
)
.jsSettings(
libraryDependencies ++=
Seq(
)
)
.settings(commonSettings: _*)
.settings(scalariformSettings: _*)
.settings(formattingSettings: _*)
.settings(publishingSettings: _*)
lazy val chelonaJVM = chelona.jvm
lazy val chelonaJS = chelona.js
lazy val root = project.in(file("."))
.enablePlugins(ScalaJSPlugin)
.aggregate(chelonaJVM, chelonaJS)
.settings(commonSettings:_*)
/*
scalatex.SbtPlugin.projectSettings
lazy val readme = scalatex.ScalatexReadme(
projectId = "readme",
wd = file(""),
url = "https://github.com/lihaoyi/scalatex/tree/master",
source = "Readme"
)*/
/////////////////////// PUBLISH /////////////////////////
lazy val publishingSettings = Seq(
publishMavenStyle := true,
publishArtifact in Test := false,
useGpg := false,
useGpgAgent := false,
sonatypeProfileName := "JuPfu",
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pomIncludeRepository := { _ => false },
pomExtra :=
<scm>
<connection>scm:git:github.com/jupfu/chelona</connection>
<developerConnection>scm:git:git@github.com:jupfu/chelona.git</developerConnection>
<url>github.com/jupfu/chelona</url>
</scm>
<developers>
<developer>
<id>JuPfu</id>
<name>Jürgen Pfundt</name>
<url>http://github.com/jupfu</url>
</developer>
</developers>)