Skip to content

Commit

Permalink
Merge pull request #2717 from wellcomecollection/use-sonatype-scala-libs
Browse files Browse the repository at this point in the history
Use sonatype scala libs
  • Loading branch information
StepanBrychta authored Oct 2, 2024
2 parents 08b8e83 + bd9e354 commit 2813c24
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 72 deletions.
10 changes: 0 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,3 @@ lazy val tei_adapter = setupProject(
localDependencies = Seq(source_model, flows),
externalDependencies = CatalogueDependencies.teiAdapterServiceDependencies
)
// AWS Credentials to read from S3

s3CredentialsProvider := {
_ =>
val builder = new STSAssumeRoleSessionCredentialsProvider.Builder(
"arn:aws:iam::760097843905:role/terraform-20210811133135108800000001",
UUID.randomUUID().toString
)
builder.build()
}
3 changes: 0 additions & 3 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ object Common {
val settings: Seq[Def.Setting[_]] = Seq(
scalaVersion := "2.12.16",
organization := "weco",
resolvers ++= Seq(
"Wellcome releases" at "s3://releases.mvn-repo.wellcomecollection.org/"
),
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
Expand Down
114 changes: 55 additions & 59 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,94 +1,90 @@
import sbt._
import scala.language.reflectiveCalls
object WellcomeDependencies {

val defaultVersion =
"32.42.0" // This is automatically bumped by the scala-libs release process, do not edit this line manually

lazy val versions = new {
val typesafe = defaultVersion
val fixtures = defaultVersion
val http = defaultVersion
val json = defaultVersion
val messaging = defaultVersion
val monitoring = defaultVersion
val storage = defaultVersion
val elasticsearch = defaultVersion
val typesafe = "32.42.1"
val fixtures = "32.42.1"
val http = "32.42.1"
val json = "32.42.1"
val messaging = "32.42.1"
val monitoring = "32.42.1"
val storage = "32.42.1"
val elasticsearch = "32.42.1"
val sierra = "32.42.1"
}

val jsonLibrary: Seq[ModuleID] = library(
name = "json",
version = versions.json
val jsonLibrary: Seq[ModuleID] = Seq(
"org.wellcomecollection" %% "json" % versions.json,
"org.wellcomecollection" %% "json" % versions.json % "test" classifier "tests"
)

val fixturesLibrary: Seq[ModuleID] = library(
name = "fixtures",
version = versions.fixtures

val fixturesLibrary: Seq[ModuleID] = Seq(
"org.wellcomecollection" %% "fixtures" % versions.fixtures,
"org.wellcomecollection" %% "fixtures" % versions.fixtures % "test" classifier "tests"
)

val messagingLibrary: Seq[ModuleID] = library(
name = "messaging",
version = versions.messaging

val messagingLibrary: Seq[ModuleID] = Seq(
"org.wellcomecollection" %% "messaging" % versions.messaging,
"org.wellcomecollection" %% "messaging" % versions.messaging % "test" classifier "tests"
)

val elasticsearchLibrary: Seq[ModuleID] = library(
name = "elasticsearch",
version = versions.elasticsearch
val elasticsearchLibrary: Seq[ModuleID] = Seq(
"org.wellcomecollection" %% "elasticsearch" % versions.elasticsearch,
"org.wellcomecollection" %% "elasticsearch" % versions.elasticsearch % "test" classifier "tests"
)

val elasticsearchTypesafeLibrary: Seq[ModuleID] = library(
name = "elasticsearch_typesafe",
version = versions.elasticsearch
val elasticsearchTypesafeLibrary: Seq[ModuleID] = Seq(
"org.wellcomecollection" %% "elasticsearch_typesafe" % versions.elasticsearch,
"org.wellcomecollection" %% "elasticsearch_typesafe" % versions.elasticsearch % "test" classifier "tests"
)

val httpLibrary: Seq[ModuleID] = library(
name = "http",
version = versions.http

val httpLibrary: Seq[ModuleID] = Seq(
"org.wellcomecollection" %% "http" % versions.http,
"org.wellcomecollection" %% "http" % versions.http % "test" classifier "tests"
)

val monitoringLibrary: Seq[ModuleID] = library(
name = "monitoring",
version = versions.monitoring

val monitoringLibrary: Seq[ModuleID] = Seq(
"org.wellcomecollection" %% "monitoring" % versions.monitoring,
"org.wellcomecollection" %% "monitoring" % versions.monitoring % "test" classifier "tests"
)

val monitoringTypesafeLibrary: Seq[ModuleID] = monitoringLibrary ++ library(
name = "monitoring_typesafe",
version = versions.monitoring
val monitoringTypesafeLibrary: Seq[ModuleID] = monitoringLibrary ++ Seq(
"org.wellcomecollection" %% "monitoring_typesafe" % versions.monitoring,
"org.wellcomecollection" %% "monitoring_typesafe" % versions.monitoring % "test" classifier "tests"
)

val storageLibrary: Seq[ModuleID] = library(
name = "storage",
version = versions.storage
val storageLibrary: Seq[ModuleID] = Seq(
"org.wellcomecollection" %% "storage" % versions.storage,
"org.wellcomecollection" %% "storage" % versions.storage % "test" classifier "tests"
)

val typesafeLibrary: Seq[ModuleID] = library(
name = "typesafe_app",
version = versions.typesafe
val typesafeLibrary: Seq[ModuleID] = Seq(
"org.wellcomecollection" %% "typesafe_app" % versions.typesafe,
"org.wellcomecollection" %% "typesafe_app" % versions.typesafe % "test" classifier "tests"
) ++ fixturesLibrary

val storageTypesafeLibrary: Seq[ModuleID] = storageLibrary ++ library(
name = "storage_typesafe",
version = versions.storage
val storageTypesafeLibrary: Seq[ModuleID] = storageLibrary ++ Seq(
"org.wellcomecollection" %% "storage_typesafe" % versions.storage,
"org.wellcomecollection" %% "storage_typesafe" % versions.storage % "test" classifier "tests"
)

val messagingTypesafeLibrary: Seq[ModuleID] = messagingLibrary ++ library(
name = "messaging_typesafe",
version = versions.messaging
val messagingTypesafeLibrary: Seq[ModuleID] = messagingLibrary ++ Seq(
"org.wellcomecollection" %% "messaging_typesafe" % versions.messaging,
"org.wellcomecollection" %% "messaging_typesafe" % versions.messaging % "test" classifier "tests"
) ++ monitoringLibrary

val sierraLibrary: Seq[ModuleID] = library(
name = "sierra",
version = defaultVersion
)

val sierraTypesafeLibrary: Seq[ModuleID] = sierraLibrary ++ library(
name = "sierra_typesafe",
version = defaultVersion
val sierraLibrary: Seq[ModuleID] = Seq(
"org.wellcomecollection" %% "sierra" % versions.sierra,
"org.wellcomecollection" %% "sierra" % versions.sierra % "test" classifier "tests"
)

private def library(name: String, version: String): Seq[ModuleID] = Seq(
"weco" %% name % version,
"weco" %% name % version % "test" classifier "tests"
val sierraTypesafeLibrary: Seq[ModuleID] = sierraLibrary ++ Seq(
"org.wellcomecollection" %% "sierra_typesafe" % versions.sierra,
"org.wellcomecollection" %% "sierra_typesafe" % versions.sierra % "test" classifier "tests"
)
}

Expand Down

0 comments on commit 2813c24

Please sign in to comment.