From e93ad459af32feaf8ff7ad8cf56bf6dd1e8e498c Mon Sep 17 00:00:00 2001 From: Michel Davit Date: Wed, 3 May 2023 12:35:15 +0200 Subject: [PATCH] Fix assembly --- .github/workflows/ci.yml | 2 +- build.sbt | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 973892d..9019148 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,4 +17,4 @@ jobs: uses: olafurpg/setup-scala@v10 with: java-version: 1.11.0 - - run: sbt test + - run: sbt test assembly diff --git a/build.sbt b/build.sbt index 9e1b22d..52a6451 100644 --- a/build.sbt +++ b/build.sbt @@ -135,6 +135,21 @@ lazy val magnolifyTools = project ) .dependsOn(shared) +ThisBuild / dependencyOverrides ++= Seq( + // force jre version + "com.google.guava" % "guava" % guavaVersion, + // sync all jackson versions + "com.fasterxml.jackson.core" % "jackson-annotations" % jacksonVersion, + "com.fasterxml.jackson.core" % "jackson-core" % jacksonVersion, + "com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion, + "com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-base" % jacksonVersion, + "com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-json-provider" % jacksonVersion, + "com.fasterxml.jackson.module" % "jackson-module-jaxb-annotations" % jacksonVersion, + "com.fasterxml.jackson.module" % "jackson-module-paranamer" % jacksonVersion, + "com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonVersion, +) + +// assembly def exclude(moduleNames: String*)( dependencies: Vector[Assembly.Dependency] ): Either[String, Vector[Assembly.JarEntry]] = { @@ -173,24 +188,10 @@ lazy val discardMetaFiles = Set( "NOTICE.md" ) -ThisBuild / dependencyOverrides ++= Seq( - // force jre version - "com.google.guava" % "guava" % guavaVersion, - // sync all jackson versions - "com.fasterxml.jackson.core" % "jackson-annotations" % jacksonVersion, - "com.fasterxml.jackson.core" % "jackson-core" % jacksonVersion, - "com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion, - "com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-base" % jacksonVersion, - "com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-json-provider" % jacksonVersion, - "com.fasterxml.jackson.module" % "jackson-module-jaxb-annotations" % jacksonVersion, - "com.fasterxml.jackson.module" % "jackson-module-paranamer" % jacksonVersion, - "com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonVersion, -) - lazy val signedMetaExtensions = Set(".DSA", ".RSA", ".SF") def discardMeta(f: String): Boolean = { - discardMetaFiles.contains(f) || signedMetaExtensions.exists(f.endsWith) + discardMetaFiles.contains(f) || signedMetaExtensions.exists(f.endsWith) || f.endsWith(".kotlin_module") } lazy val assemblySettings = Seq(