This repository has been archived by the owner. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.sbt
78 lines (70 loc) · 2.41 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
val publishSettings = Seq(
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at s"${nexus}content/repositories/snapshots")
else Some("releases" at s"${nexus}service/local/staging/deploy/maven2")
},
pomExtra := {
<url>https://github.com/fomkin/pushka</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:fomkin/pushka.git</url>
<connection>scm:git:[email protected]:fomkin/pushka.git</connection>
</scm>
<developers>
<developer>
<id>fomkin</id>
<name>Aleksey Fomkin</name>
<email>[email protected]</email>
</developer>
</developers>
}
)
val commonSettings = publishSettings ++ Seq(
organization := "com.github.fomkin",
version := "0.8.0",
libraryDependencies += "org.scalatest" %%% "scalatest" % "3.0.0" % "test",
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-Xfatal-warnings",
"-language:postfixOps",
"-language:implicitConversions"
)
)
lazy val core = crossProject.crossType(CrossType.Pure).
settings(commonSettings: _*).
settings(
normalizedName := "pushka-core",
libraryDependencies ++= Seq(
"org.typelevel" %% "macro-compat" % "1.1.1",
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided",
"org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided"
),
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full),
sourceGenerators in Compile <+= sourceManaged in Compile map GenTuples
)
lazy val coreJS = core.js
lazy val coreJVM = core.jvm
lazy val json = crossProject.crossType(CrossType.Full).
settings(commonSettings: _*).
settings(
normalizedName := "pushka-json",
unmanagedSourceDirectories in Test += baseDirectory.value / ".." / "test-src"
).
jvmSettings(libraryDependencies += "org.spire-math" %% "jawn-parser" % "0.10.4").
dependsOn(core)
lazy val jsonJS = json.js
lazy val jsonJVM = json.jvm
publishTo := Some(Resolver.file("Unused transient repository", file("target/unusedrepo")))
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0")
publishArtifact := false