Skip to content

Commit

Permalink
chore: shade jackson libs (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
pradomota authored Mar 14, 2022
1 parent 844c0e1 commit e521b95
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
36 changes: 22 additions & 14 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ lazy val core = (project in file("core"))
mimaSettings,
unidocSettings,
releaseSettings,
addArtifact(artifact in (Compile, assembly), assembly),
libraryDependencies ++= Seq(
// Adding test classifier seems to break transitive resolution of the core dependencies
"org.apache.spark" %% "spark-hive" % sparkVersion % "provided",
Expand Down Expand Up @@ -124,6 +125,7 @@ lazy val contribs = (project in file("contribs"))
commonSettings,
scalaStyleSettings,
releaseSettings,
addArtifact(artifact in (Compile, assembly), assembly),
Compile / packageBin / mappings := (Compile / packageBin / mappings).value ++
listPythonFiles(baseDirectory.value.getParentFile / "python"),

Expand Down Expand Up @@ -297,20 +299,26 @@ lazy val unidocSettings = Seq(
import ReleaseTransformations._

lazy val releaseSettings = Seq(
publishMavenStyle := true,
publishArtifact := true,
Test / publishArtifact := false,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseCrossBuild := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) {
Some("snapshots" at nexus + "content/repositories/snapshots")
} else {
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
assemblyShadeRules in assembly := Seq(ShadeRule.rename("com.fasterxml.jackson.**" -> "shade.@0").inAll),
assemblyMergeStrategy in assembly := {
case "reference.conf" => MergeStrategy.concat
case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
case PathList("META-INF", "services", _@_*) => MergeStrategy.concat
case PathList("META-INF", xs) if xs.endsWith(".SF") || xs.endsWith(".DSA") || xs.endsWith(".RSA") => MergeStrategy.discard
case PathList("META-INF", _@_*) => MergeStrategy.first
case _ => MergeStrategy.first
},
artifact in (Compile, assembly) := {
val art = (artifact in (Compile, assembly)).value
art.withClassifier(Some("assembly"))
},
test in assembly := {},
isSnapshot := true,
publishMavenStyle := true,
releaseCrossBuild := false,
publishTo := Some("Baikal Internal Dependencies" at "s3://s3-us-east-1.amazonaws.com/4p-maven/snapshots"),
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")),
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
pomExtra :=
<url>https://delta.io/</url>
<scm>
Expand Down Expand Up @@ -359,7 +367,7 @@ lazy val releaseSettings = Seq(
// Looks like some of release settings should be set for the root project as well.
publishArtifact := false // Don't release the root project
publish / skip := true
publishTo := Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots")
publishTo := Some("Baikal Internal Dependencies" at "s3://s3-us-east-1.amazonaws.com/4p-maven/snapshots")
releaseCrossBuild := false // Don't use sbt-release's cross facility
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
Expand All @@ -368,7 +376,7 @@ releaseProcess := Seq[ReleaseStep](
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
publishArtifacts,
setNextVersion,
commitNextVersion
)
4 changes: 4 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")

addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")

addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3")

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.9.2")

addSbtPlugin("com.simplytyped" % "sbt-antlr4" % "0.8.3")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")

addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "0.19.0")
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "1.1.0"
ThisBuild / version := "1.1.0-tef"

0 comments on commit e521b95

Please sign in to comment.