forked from lemonlabsuk/scala-uri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
79 lines (70 loc) · 2.5 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
import sbt.Keys.libraryDependencies
import org.scalajs.sbtplugin.cross.CrossType
name := "scala-uri root"
scalaVersion in ThisBuild := "2.12.6"
crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.6", "2.13.0-M4")
val sharedSettings = Seq(
name := "scala-uri",
organization := "io.lemonlabs",
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8", "-feature", "-Xfatal-warnings"),
libraryDependencies ++= Seq(
"org.parboiled" %%% "parboiled" % "2.1.5",
"com.chuusai" %%% "shapeless" % "2.3.3",
"org.scalatest" %%% "scalatest" % "3.0.6-SNAP2" % "test"
),
parallelExecution in Test := false
)
val jvmSettings = Seq(
libraryDependencies ++= Seq(
"io.spray" %% "spray-json" % "1.3.4"
)
)
val publishingSettings = Seq(
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
resolvers += "Sonatype OSS Releases" at "https://oss.sonatype.org/content/repositories/releases",
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")
},
pomExtra :=
<url>https://github.com/lemonlabsuk/scala-uri</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:lemonlabsuk/scala-uri.git</url>
<connection>scm:[email protected]:lemonlabsuk/scala-uri.git</connection>
</scm>
<developers>
<developer>
<id>theon</id>
<name>Ian Forsey</name>
<url>https://lemonlabs.io</url>
</developer>
</developers>
)
lazy val root = project.in(file("."))
.aggregate(scalaUriJvm, scalaUriJs)
.settings(
publish := {},
publishLocal := {}
)
lazy val scalaUri =
crossProject.in(file("."))
.settings(sharedSettings)
.settings(publishingSettings)
.jvmSettings(jvmSettings)
lazy val scalaUriJs = scalaUri.js
lazy val scalaUriJvm = scalaUri.jvm
lazy val updatePublicSuffixes = taskKey[Unit]("Updates the public suffix Trie at io.lemonlabs.uri.internet.PublicSuffixes")
updatePublicSuffixes := UpdatePublicSuffixTrie.generate()