-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
97 lines (89 loc) · 3.05 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
import Dependencies._
lazy val projectName = "snostr"
ThisBuild / version := "0.3.0"
lazy val commonSettings: Seq[Setting[_]] = Seq(
scalaVersion := "2.13.10",
version := (ThisBuild / version).value,
organization := "io.github.rorp",
organizationName := "io.github.rorp",
scmInfo := Some(
ScmInfo(
url("https://github.com/rorp/snostr"),
"scm:[email protected]:rorp/snostr.git"
)
),
developers := List(
Developer(
id = "rorp",
name = "rorp",
email = "[email protected]",
url = url("https://github.com/rorp")
)
),
description := "A minimalistic Scala Nostr toolkit.",
licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
),
homepage := Some(url("https://github.com/rorp/snostr")),
pomIncludeRepository := { _ => false },
publishTo := {
val nexus = "https://s01.oss.sonatype.org/"
if (version.value.endsWith("-SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishMavenStyle := true,
credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials"),
)
lazy val root = (project in file("."))
.settings(commonSettings: _*)
.settings(
name := projectName,
publishArtifact := false
)
.aggregate(core, codecJackson, codecZioJson, clientAkkaHttp)
lazy val core = (project in file("core"))
.settings(commonSettings: _*)
.settings(
name := s"$projectName-core",
description := "Snostr Core",
libraryDependencies += secp256k1KmpJniJvm,
libraryDependencies += bitcoinKmpJvm,
libraryDependencies += lazysodium,
libraryDependencies += scalaTest % Test,
)
lazy val codecJackson = (project in file("codec-jackson"))
.settings(commonSettings: _*)
.settings(
name := s"$projectName-codec-jackson",
description := "Snostr Jackson Codecs",
libraryDependencies += json4sJackson % Provided,
libraryDependencies += scalaTest % Test,
)
.dependsOn(core)
lazy val codecZioJson = (project in file("codec-zio-json"))
.settings(commonSettings: _*)
.settings(
name := s"$projectName-codec-zio-json",
description := "Snostr ZIO-JSON Codecs",
libraryDependencies += zioJson % Provided,
libraryDependencies += scalaTest % Test,
)
.dependsOn(core)
lazy val clientAkkaHttp = (project in file("client-akka-http"))
.settings(commonSettings: _*)
.settings(
name := s"$projectName-client-akka-http",
description := "Snostr Akka HTTP client",
libraryDependencies += akkaHttp % Provided,
libraryDependencies += akkaStreams % Provided,
libraryDependencies += akkaHttpSocks5,
libraryDependencies += akkaHttp % Test,
libraryDependencies += akkaStreams % Test,
libraryDependencies += json4sJackson % Test,
libraryDependencies += zioJson % Test,
libraryDependencies += akkaTestKit % Test,
libraryDependencies += testContainers % Test,
libraryDependencies += scalaTest % Test,
)
.dependsOn(core)
.dependsOn(codecZioJson % "test->test", codecJackson % "test->test")