-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
150 lines (136 loc) · 4.34 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
lazy val scala213 = "2.13.1"
lazy val scala212 = "2.12.10"
lazy val scala211 = "2.11.12"
lazy val supportedScalaVersions = List(scala213, scala212, scala211)
ThisBuild / scalaVersion := scala213
ThisBuild / organization := "com.hypertino"
ThisBuild / scalacOptions ++= Seq("-feature", "-deprecation")
lazy val jsonBinders = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Full)
.settings(publishSettings:_*)
.settings(
crossScalaVersions := supportedScalaVersions,
name := "json-binders",
version := "1.3-SNAPSHOT",
libraryDependencies ++= Seq(
"com.hypertino" %%% "binders" % "1.3.0",
"org.scalamock" %%% "scalamock" % "4.4.0" % Test,
"org.scalatest" %% "scalatest" % "3.1.0" % Test,
"org.scala-lang" % "scala-reflect" % scalaVersion.value
),
publishArtifact := true,
publishArtifact in Test := false,
resolvers ++= Seq(
Resolver.sonatypeRepo("public")
)
)
.jsSettings(
)
.jvmSettings(
libraryDependencies ++= Seq(
"com.fasterxml.jackson.core" % "jackson-core" % "2.10.2"
)
)
lazy val jsonBindersJS = jsonBinders.js
lazy val jsonBindersJVM = jsonBinders.jvm
lazy val jsonTimeBinders = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Full)
.dependsOn(jsonBinders)
.settings(publishSettings:_*)
.settings(
name := "json-time-binders",
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % "2.0.0-RC3",
"org.scalamock" %%% "scalamock" % "4.4.0" % Test,
"org.scalatest" %% "scalatest" % "3.1.0" % Test,
"org.scala-lang" % "scala-reflect" % scalaVersion.value
),
publishArtifact := true,
publishArtifact in Test := false,
resolvers ++= Seq(
Resolver.sonatypeRepo("public")
)
)
.jsSettings(
)
.jvmSettings(
)
lazy val jsonTimeBindersJS = jsonTimeBinders.js
lazy val jsonTimeBindersJVM = jsonTimeBinders.jvm
//lazy val benchTest = crossProject(JSPlatform, JVMPlatform)
// .crossType(CrossType.Full)
// .dependsOn(jsonBinders)
// .settings(publishSettings:_*)
// .enablePlugins(JmhPlugin)
// .settings(
// name := "bench-test",
// libraryDependencies ++= Seq(
// "com.lihaoyi" %%% "upickle" % "0.9.8",
// "org.scala-lang" % "scala-reflect" % scalaVersion.value
// ),
// publishArtifact := false,
// publishArtifact in Test := false,
// publish := {},
// publishLocal := {},
// resolvers ++= Seq(
// Resolver.sonatypeRepo("public")
// )
//)
// .jsSettings(
// scalaJSStage in Global := FullOptStage,
// )
// .jvmSettings(
// )
//
//lazy val benchTestJS = benchTest.js
//
//lazy val benchTestJVM = benchTest.jvm
lazy val `json-binders-root` = project.settings(publishSettings:_*).in(file("."))
.settings(publishSettings:_*)
.aggregate(jsonBindersJVM, jsonBindersJS, jsonTimeBindersJVM, jsonTimeBindersJS)
.settings(
crossScalaVersions := Nil,
publish / skip := true
)
val publishSettings = Seq(
pomExtra := <url>https://github.com/hypertino/binders-json</url>
<licenses>
<license>
<name>BSD-style</name>
<url>http://opensource.org/licenses/BSD-3-Clause</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:hypertino/binders-json.git</url>
<connection>scm:git:[email protected]:hypertino/binders-json.git</connection>
</scm>
<developers>
<developer>
<id>maqdev</id>
<name>Magomed Abdurakhmanov</name>
<url>https://github.com/maqdev</url>
</developer>
<developer>
<id>hypertino</id>
<name>Hypertino</name>
<url>https://github.com/hypertino</url>
</developer>
</developers>,
publishMavenStyle := true,
pomIncludeRepository := { _ => false},
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")
}
)
Global / pgpPassphrase := Option(System.getenv().get("oss_gpg_passphrase")).map(_.toCharArray)
Global / credentials ++= Seq(
Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", System.getenv().get("sonatype_username"), System.getenv().get("sonatype_password")),
)
Global / useGpgAgent := false
usePgpKeyHex("97A4EB3D60277A26D5B5480BA53DC2FF4858319D")