It all comes down to Jar Jar Links. Since SBT assembly is moved to Jar Jar Abrams , it now fixes the shading issues around Scala classes that are affected in the Couchbase Spark Connector as well. Gradle, as I have mentioned was a no go. Maven did not work either.
For this reason, we upgraded the build model to SBT.  It sucessfully shades the old libraries and we upgraded our clients to Scala version 1.0.5. This is how we depend on it currently. (Resolver is not public.)
val couchbaseSpark = ("com.couchbase.client" %% "spark-connector" % "3.0.2")
- DCP version 0.28.0.
- Java client 2.7.15.
Shade rules in the SBT build model of Spark Couchbase Connector:
assemblyShadeRules in assembly := Seq(
.rename("com.couchbase.client.java.**" -> "shaded.com.couchbase.client.java.@1")
.inLibrary("com.couchbase.client" % "java-client" % "2.7.15")
.rename("com.couchbase.client.core.**" -> "shaded.com.couchbase.client.core.@1")
.rename("com.couchbase.client.encryption.**" -> "shaded.com.couchbase.client.encryption.@1")
Tests go through, including our own tests in all of our child projects.
Out of interest, and because we are always keen to find ways of encouraging community contributions, would you submit it if we had a Github PR process instead?
P.S.: The new Java & Scala library design is really good.