-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
135 lines (124 loc) · 4.93 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
lazy val scala212 = "2.12.8"
lazy val scala213 = "2.13.3"
lazy val commonSettings = Seq(
organizationName := "foerster technologies",
organization := "com.foerster-technologies",
name := "slick-mysql",
version := "1.1.0",
scalaVersion := scala213,
crossScalaVersions := List(scala212, scala213),
scalacOptions ++= Seq("-deprecation",
"-feature",
"-language:implicitConversions",
"-language:reflectiveCalls",
"-language:higherKinds",
"-language:postfixOps",
"-language:existentials"),
resolvers += Resolver.mavenLocal,
resolvers += Resolver.sonatypeRepo("snapshots"),
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/",
resolvers += "spray" at "https://repo.spray.io/",
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")
},
publishConfiguration := publishConfiguration.value.withOverwrite(true),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
// makePomConfiguration := makePomConfiguration.value. // ~= { _.(configurations = Some(Seq(Compile, Runtime, Optional))) },
pomExtra :=
<url>https://github.com/foerster-technologies/slick-mysql</url>
<licenses>
<license>
<name>BSD-style</name>
<url>http://www.opensource.org/licenses/bsd-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>git@github.com:foerster-technologies/slick-mysql.git</url>
<connection>scm:git:git@github.com:foerster-technologies/slick-mysql.git</connection>
</scm>
<developers>
<developer>
<id>TimFoerster</id>
<name>Tim Förster</name>
<email>tim@foerster-technologies.com</email>
<organization>foerster technologies GmbH</organization>
<organizationUrl>https://www.foerster-technologies.com</organizationUrl>
<timezone>+1</timezone>
</developer>
</developers>
)
def mainDependencies(scalaVersion: String) = Seq (
"org.scala-lang" % "scala-reflect" % scalaVersion,
"com.typesafe.slick" %% "slick" % "3.3.2",
"org.slf4j" % "slf4j-simple" % "1.7.30" % "provided",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2" % "provided",
"org.scalatest" %% "scalatest" % "3.1.1" % "test"
)
lazy val slickMySQLCore = (project in file("./core"))
.settings(
Defaults.coreDefaultSettings ++ commonSettings ++ Seq(
name := "slick-mysql_core",
description := "Slick extensions for MySQL - Core",
libraryDependencies := mainDependencies(scalaVersion.value)
)
)
lazy val slickMySQLProject = (project in file("."))
.settings(
Defaults.coreDefaultSettings ++ commonSettings ++ Seq(
name := "slick-mysql",
description := "Slick extensions for MySQL",
libraryDependencies := mainDependencies(scalaVersion.value)
)
).dependsOn(slickMySQLCore)
.aggregate(slickMySQLCore, slickMySQLJts, slickMySQLPlayJson, slickMySQLCirceJson, slickMySQLJodaMoney)
lazy val slickMySQLJts = (project in file("./addons/jts"))
.settings(
Defaults.coreDefaultSettings ++ commonSettings ++ Seq(
name := "slick-mysql_jts",
description := "Slick extensions for MySQL - jts module",
libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq(
"org.locationtech.jts" % "jts-core" % "1.16.1"
)
)
).dependsOn(slickMySQLCore)
lazy val slickMySQLPlayJson = (project in file("./addons/play-json"))
.settings(
Defaults.coreDefaultSettings ++ commonSettings ++ Seq(
name := "slick-mysql_play-json",
description := "Slick extensions for MySQL - play-json module",
libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq(
"com.typesafe.play" %% "play-json" % "2.8.1"
)
)
).dependsOn(slickMySQLCore)
lazy val circeVersion = "0.13.0"
lazy val slickMySQLCirceJson = (project in file("./addons/circe-json"))
.settings(
Defaults.coreDefaultSettings ++ commonSettings ++ Seq(
name := "slick-mysql_circe-json",
description := "Slick extensions for MySQL - circe-json module",
libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser",
"io.circe" %% "circe-literal"
).map(_ % circeVersion),
)
).dependsOn(slickMySQLCore)
lazy val slickMySQLJodaMoney = (project in file("./addons/joda-money"))
.settings(
Defaults.coreDefaultSettings ++ commonSettings ++ Seq(
name := "slick-mysql_joda-money",
description := "Slick extensions for MySQL - joda-money module",
libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq(
"org.joda" % "joda-money" % "1.0.1"
)
)
).dependsOn(slickMySQLCore)