Skip to content

Commit

Permalink
Upgrade sbt assembly, add exclusions to fix assembly step
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-in-a-Jar committed May 1, 2023
1 parent e05691e commit e4ed968
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 13 deletions.
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ lazy val `cromwell-drs-localizer` = project
lazy val pact4s = project.in(file("pact4s"))
.settings(pact4sSettings)
.dependsOn(services)
.disablePlugins(sbtassembly.AssemblyPlugin)

lazy val server = project
.withExecutableSettings("cromwell", serverDependencies)
Expand Down
6 changes: 3 additions & 3 deletions pact4s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ $ git clone https://github.com/broadinstitute/cromwell.git
$ cd cromwell
```

If you are already using OpenJDK 17, run the following command.
If you are already using OpenJDK 11, run the following command.
```
$ sbt "project pact4s" clean test
```

Otherwise, you can run the command inside a docker container with OpenJDK 17 installed.
Otherwise, you can run the command inside a docker container with OpenJDK 11 installed.
This is especially useful when automating contract tests in a GitHub Action runner which does not guarantee the correct OpenJDK version.
```
docker run --rm -v $PWD:/working \
-v jar-cache:/root/.ivy \
-v jar-cache:/root/.ivy2 \
-w /working \
sbtscala/scala-sbt:openjdk-11.0.14.1_1.5.5_2.13.9 \
sbtscala/scala-sbt:openjdk-11.0.16_1.8.1_2.13.10 \
sbt "project pact4s" clean test
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ import org.broadinstitute.dsde.workbench.model.WorkbenchEmail
import org.http4s.Credentials.Token
import org.http4s.{AuthScheme, Credentials}
import pact4s.algebras.PactBodyJsonEncoder

case object InvalidCredentials extends Exception

case object UserAlreadyExists extends Exception

case object UnknownError extends Exception

object AuthHelper {
Expand Down
6 changes: 3 additions & 3 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,6 @@ object Dependencies {
// Use mockito Java DSL directly instead of the numerous and often hard to keep updated Scala DSLs.
// See also scaladoc in common.mock.MockSugar and that trait's various usages.
"org.mockito" % "mockito-core" % mockitoV,
"io.github.jbwheatley" %% "pact4s-scalatest" % pact4sV,
"io.github.jbwheatley" %% "pact4s-circe" % pact4sV,
) ++ slf4jBindingDependencies // During testing, add an slf4j binding for _all_ libraries.

val kindProjectorPlugin = "org.typelevel" % "kind-projector" % kindProjectorV cross CrossVersion.full
Expand Down Expand Up @@ -798,6 +796,8 @@ object Dependencies {
The jakarta.annotation inclusion is above in googleApiClientDependencies.
*/
ExclusionRule("javax.annotation", "javax.annotation-api"),
ExclusionRule("javax.activation"),
ExclusionRule("javax.inject", "javax.inject"),
)

val http4sDsl = "org.http4s" %% "http4s-dsl" % http4sV
Expand All @@ -814,6 +814,6 @@ object Dependencies {
http4sDsl,
http4sEmberServer,
http4sCirce,
scalaTest
scalaTest,
)
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# scala-steward:off
sbt.version=1.5.5
sbt.version=1.8.1
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.9.0")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.1.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.1")
addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.4")
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16")
Expand Down

0 comments on commit e4ed968

Please sign in to comment.