-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
114 lines (98 loc) · 3.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
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
import Dependencies._
import com.jsuereth.sbtpgp.PgpKeys.publishSigned
lazy val scala213 = "2.13.10"
lazy val scala212 = "2.12.17"
lazy val scala211 = "2.11.12"
lazy val supportedScalaVersions = Seq(scala213, scala212 /*, scala211*/ )
ThisBuild / organization := "io.github.crystailx"
ThisBuild / version := "1.4.0"
ThisBuild / scalaVersion := scala213
ThisBuild / crossScalaVersions := supportedScalaVersions
ThisBuild / trackInternalDependencies := TrackLevel.TrackAlways
//ThisBuild / exportJars := true
ThisBuild / libraryDependencies ++= Dependencies.test.map(_ % Test)
// sonatype publish
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
ThisBuild / publishTo := sonatypePublishToBundle.value
scalacOptions := Seq(
"-unchecked",
"-deprecation",
"-feature"
)
lazy val moduleSettings = Seq(
crossScalaVersions := supportedScalaVersions,
libraryDependencies ++= Dependencies.test
.map(_ % Test) ++ Dependencies.log
)
lazy val noPublishSettings = Seq(
publish / skip := true,
publish := {},
publishLocal := {},
publishSigned := {}
)
lazy val core = (project in file("scalaflagr-core"))
.settings(name := "scalaflagr-core")
.settings(moduleSettings)
.settings(libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, scalaMajor)) if scalaMajor == 12 =>
Seq("com.chuusai" %% "shapeless" % "2.3.10")
case _ => Seq.empty
}))
lazy val coreWithTest = core % "compile->compile;test->test"
lazy val sttp1Client = (project in file("scalaflagr-client-sttp1"))
.settings(name := "scalaflagr-client-sttp1")
.settings(moduleSettings)
.settings(libraryDependencies ++= Dependencies.sttp1)
.dependsOn(core)
lazy val catsEffect = (project in file("scalaflagr-effect-cats"))
.settings(name := "scalaflagr-effect-cats")
.settings(moduleSettings)
.settings(libraryDependencies ++= Dependencies.cats)
.dependsOn(core)
lazy val twitterEffect = (project in file("scalaflagr-effect-twitter"))
.settings(name := "scalaflagr-effect-twitter")
.settings(moduleSettings)
.settings(libraryDependencies ++= Dependencies.twitter)
.dependsOn(core)
lazy val jsonCirce = (project in file("scalaflagr-json-circe"))
.settings(name := "scalaflagr-json-circe")
.settings(moduleSettings)
.settings(libraryDependencies ++= Dependencies.circe)
.dependsOn(coreWithTest)
lazy val jsonPlay = (project in file("scalaflagr-json-play"))
.settings(name := "scalaflagr-json-play")
.settings(moduleSettings)
.settings(libraryDependencies ++= Dependencies.playJson)
.dependsOn(coreWithTest)
lazy val jsonJackson = (project in file("scalaflagr-json-jackson"))
.settings(name := "scalaflagr-json-jackson")
.settings(moduleSettings)
.settings(libraryDependencies ++= Dependencies.jackson)
.dependsOn(coreWithTest)
lazy val scredisCache = (project in file("scalaflagr-cache-scredis"))
.settings(name := "scalaflagr-cache-scredis")
.settings(moduleSettings)
.settings(libraryDependencies ++= Dependencies.redis)
.dependsOn(core)
lazy val scaffeineCache = (project in file("scalaflagr-cache-scaffeine"))
.settings(name := "scalaflagr-cache-scaffeine")
.settings(moduleSettings)
.settings(libraryDependencies ++= Dependencies.scaffeine)
.dependsOn(core)
lazy val root = (project in file("."))
.settings(noPublishSettings)
.settings(
crossScalaVersions := Nil,
update / aggregate := false
)
.aggregate(
core,
sttp1Client,
catsEffect,
twitterEffect,
jsonCirce,
jsonPlay,
jsonJackson,
scredisCache,
scaffeineCache
)