-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.sbt
161 lines (151 loc) · 4.48 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
151
152
153
154
155
156
157
158
159
160
161
name := "shapeless-datatype"
description := "Shapeless utilities for common data types"
val avroVersion = "1.12.0"
val bigqueryVersion = "v2-rev20241222-2.0.0"
val datastoreVersion = "2.25.1"
val jacksonVersion = "2.18.2"
val jodaTimeVersion = "2.13.0"
val magnolifyVersion = "0.7.4"
val protobufVersion = "3.25.5"
val scalacheckVersion = "1.18.1"
val shapelessVersion = "2.3.12"
val tensorflowVersion = "1.15.0"
val commonSettings = Seq(
organization := "me.lyh",
scalaVersion := "2.13.15",
crossScalaVersions := Seq("2.12.20", "2.13.15"),
scalacOptions ++= Seq("-target:jvm-1.8", "-deprecation", "-feature", "-unchecked"),
// protobuf-lite is an older subset of protobuf-java and causes issues
excludeDependencies += "com.google.protobuf" % "protobuf-lite",
// Release settings
publishTo := Some(
if (isSnapshot.value) Opts.resolver.sonatypeOssSnapshots.head else Opts.resolver.sonatypeStaging
),
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishMavenStyle := true,
Test / publishArtifact := false,
sonatypeProfileName := "me.lyh",
licenses := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("https://github.com/nevillelyh/shapeless-datatype")),
scmInfo := Some(
ScmInfo(
url("https://github.com/nevillelyh/shapeless-datatype.git"),
"scm:git:[email protected]:nevillelyh/shapeless-datatype.git"
)
),
developers := List(
Developer(
id = "sinisa_lyh",
name = "Neville Li",
email = "[email protected]",
url = url("https://twitter.com/sinisa_lyh")
)
)
)
val noPublishSettings = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val root: Project = Project(
"shapeless-datatype",
file(".")
).settings(
commonSettings ++ noPublishSettings
).aggregate(
core,
avro,
bigquery,
datastore,
tensorflow,
test
)
lazy val core: Project = Project(
"core",
file("core")
).settings(
moduleName := "shapeless-datatype-core",
commonSettings,
description := "Shapeless utilities for common data types",
libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % shapelessVersion
)
).dependsOn(
test % "test->test"
)
lazy val avro: Project = Project(
"avro",
file("avro")
).settings(
moduleName := "shapeless-datatype-avro",
commonSettings,
description := "Shapeless utilities for Apache Avro",
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.apache.avro" % "avro" % avroVersion % Provided
)
).dependsOn(
core,
test % "test->test"
)
lazy val bigquery: Project = Project(
"bigquery",
file("bigquery")
).settings(
moduleName := "shapeless-datatype-bigquery",
commonSettings,
description := "Shapeless utilities for Google Cloud BigQuery",
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"com.google.apis" % "google-api-services-bigquery" % bigqueryVersion % Provided,
"joda-time" % "joda-time" % jodaTimeVersion % Provided,
"com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion % Test
)
).dependsOn(
core,
test % "test->test"
)
lazy val datastore: Project = Project(
"datastore",
file("datastore")
).settings(
commonSettings,
moduleName := "shapeless-datatype-datastore",
description := "Shapeless utilities for Google Cloud Datastore",
libraryDependencies ++= Seq(
"com.google.cloud.datastore" % "datastore-v1-proto-client" % datastoreVersion % Provided,
"joda-time" % "joda-time" % jodaTimeVersion % Provided
)
).dependsOn(
core,
test % "test->test"
)
lazy val tensorflow: Project = Project(
"tensorflow",
file("tensorflow")
).settings(
moduleName := "shapeless-datatype-tensorflow",
commonSettings,
description := "Shapeless utilities for TensorFlow",
libraryDependencies ++= Seq(
"org.tensorflow" % "proto" % tensorflowVersion % Provided
)
).dependsOn(
core,
test % "test->test"
)
lazy val test: Project = Project(
"test",
file("test")
).settings(
commonSettings ++ noPublishSettings,
description := "Shapeless utilities for common data types - shared code for unit test",
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"com.spotify" %% "magnolify-scalacheck" % magnolifyVersion % Test,
"org.scalacheck" %% "scalacheck" % scalacheckVersion % Test,
"com.google.protobuf" % "protobuf-java" % protobufVersion % Test,
"joda-time" % "joda-time" % jodaTimeVersion % Test
)
)