@@ -35,10 +35,10 @@ lazy val javaModuleSettings = commonSettings ++ Seq(
35
35
crossPaths := false // drop off Scala suffix from artifact names and publish path
36
36
)
37
37
38
- val defaultScala = scalaVersion := " 2.13.1"
39
38
lazy val scalaModuleSettings = commonSettings ++ Seq (
40
- defaultScala,
41
- crossScalaVersions := Seq (" 2.13.1" , " 2.12.10" , " 2.11.12" ),
39
+ version := " 1.1.0-SNAPSHOT" ,
40
+ scalaVersion := V .scala,
41
+ crossScalaVersions := V .crossScala,
42
42
scalacOptions ++= Seq (" -encoding" , " UTF-8" , " -target:jvm-1.8" , " -deprecation" , " -feature" ),
43
43
scalacOptions ++= (CrossVersion .partialVersion(scalaVersion.value) match {
44
44
// Required for Scala 2.11 build, this enables support for Java SAM.
@@ -203,7 +203,7 @@ lazy val `tracing-opentelemetry` = project
203
203
opentelemetry(" exporters-inmemory" ) % Test
204
204
),
205
205
// tracing-opentelemetry need scala only when test
206
- defaultScala ,
206
+ scalaVersion := V .scala ,
207
207
scalacOptions ++= Seq (" -encoding" , " UTF-8" , " -target:jvm-1.8" , " -deprecation" , " -feature" ),
208
208
Test / unmanagedSourceDirectories := Seq ((Test / javaSource).value, (Test / scalaSource).value)
209
209
)
@@ -215,13 +215,18 @@ lazy val `scala-implicits` = project
215
215
.settings(scalaModuleSettings : _* )
216
216
.settings(
217
217
description := " The official Couchbase Scala SDK (Implicits)" ,
218
- version := " 1.1.0-SNAPSHOT" ,
219
- libraryDependencies ++= scalaImplicitsDeps.value,
220
- exportJars := true ,
221
- publish / skip := true
218
+ libraryDependencies ++= scalaImplicitsDeps.value
222
219
)
223
220
.dependsOn(`core-io`, `test-utils` % Test )
224
221
222
+ lazy val `scala-macro` = project
223
+ .disablePlugins(AssemblyPlugin , CheckstylePlugin )
224
+ .settings(scalaModuleSettings : _* )
225
+ .settings(
226
+ libraryDependencies += jsoniterScala(" macros" )
227
+ )
228
+ .dependsOn(`scala-implicits`)
229
+
225
230
val scalaClientAssemblySettings = commonAssemblySettings ++ inTask(assembly)(
226
231
Seq (
227
232
assemblyShadeRules := Seq (
@@ -230,16 +235,14 @@ val scalaClientAssemblySettings = commonAssemblySettings ++ inTask(assembly)(
230
235
).map { p =>
231
236
ShadeRule .rename(s " $p.** " -> s " ${organization.value}.scala.deps.@0 " ).inAll
232
237
},
233
- // shade scala-java8-compat, scala-implicits and selfJar (scala-client)
238
+ // shade scala-java8-compat, and selfJar (scala-client)
234
239
assemblyExcludedJars := {
235
- val cp = fullClasspath.value
236
- val depJar = (`scala-implicits` / Compile / packageBin / artifactPath).value
237
- val selfJar = (Compile / packageBin / artifactPath).value
238
- val includedJars = Set (depJar, selfJar)
239
- val sv = scalaBinaryVersion.value
240
+ val cp = fullClasspath.value
241
+ val selfJar = (Compile / packageBin / artifactPath).value
242
+ val sv = scalaBinaryVersion.value
240
243
cp.filterNot { entry =>
241
244
entry.isModule(scalaJava8Compat, sv) ||
242
- includedJars.contains( entry.data)
245
+ entry.data == selfJar
243
246
}
244
247
},
245
248
shadeResourceTransformers += Discard (
@@ -253,7 +256,6 @@ lazy val `scala-client` = project
253
256
.enableAssemblyPublish()
254
257
.settings(
255
258
description := " The official Couchbase Scala SDK" ,
256
- version := " 1.1.0-SNAPSHOT" ,
257
259
libraryDependencies ++= scalaClientDeps.value,
258
260
// https://docs.scala-lang.org/overviews/core/collections-migration-213.html#how-do-i-cross-build-my-project-against-scala-212-and-scala-213
259
261
unmanagedSourceDirectories in Compile += {
@@ -265,15 +267,14 @@ lazy val `scala-client` = project
265
267
}
266
268
)
267
269
.itConfig()
268
- .dependsOn(`core-io`, `scala-implicits`, `test-utils` % Test )
269
- .removePomDependsOn(`scala-implicits` )
270
+ .dependsOn(`core-io`, `scala-implicits`, `scala-macro` % Provided , ` test-utils` % Test )
271
+ .removePomDependsOn(scalaJava8Compat )
270
272
271
273
lazy val `scala-examples` = project
272
274
.disablePlugins(AssemblyPlugin , CheckstylePlugin )
273
275
.settings(scalaModuleSettings : _* )
274
276
.settings(
275
277
description := " Examples for the Couchbase Scala SDK" ,
276
- version := " 1.1.0-SNAPSHOT" ,
277
278
// resolvers += "oss.sonatype.org-snapshot" at "https://oss.jfrog.org/artifactory/oss-snapshot-local",
278
279
libraryDependencies ++= Seq (
279
280
opentelemetry(" sdk" ),
@@ -302,6 +303,7 @@ lazy val aggregated = Seq[ProjectReference](
302
303
`java-client`,
303
304
`java-examples`,
304
305
`scala-implicits`,
306
+ `scala-macro`,
305
307
`scala-client`,
306
308
`scala-examples`,
307
309
`test-utils`,
0 commit comments