Produce a BOM for Akka libraries (#29839)
This commit is contained in:
parent
78ffa91c4a
commit
12ca84c247
3 changed files with 34 additions and 26 deletions
39
build.sbt
39
build.sbt
|
|
@ -57,13 +57,10 @@ resolverSettings
|
|||
def isScala213: Boolean = System.getProperty("akka.build.scalaVersion", "").startsWith("2.13")
|
||||
|
||||
// When this is updated the set of modules in ActorSystem.allModules should also be updated
|
||||
lazy val aggregatedProjects: Seq[ProjectReference] = List[ProjectReference](
|
||||
lazy val userProjects: Seq[ProjectReference] = List[ProjectReference](
|
||||
actor,
|
||||
actorTests,
|
||||
actorTestkitTyped,
|
||||
actorTyped,
|
||||
actorTypedTests,
|
||||
benchJmh,
|
||||
cluster,
|
||||
clusterMetrics,
|
||||
clusterSharding,
|
||||
|
|
@ -73,30 +70,36 @@ lazy val aggregatedProjects: Seq[ProjectReference] = List[ProjectReference](
|
|||
coordination,
|
||||
discovery,
|
||||
distributedData,
|
||||
docs,
|
||||
jackson,
|
||||
multiNodeTestkit,
|
||||
osgi,
|
||||
persistence,
|
||||
persistenceQuery,
|
||||
persistenceShared,
|
||||
persistenceTck,
|
||||
persistenceTyped,
|
||||
persistenceTypedTests,
|
||||
persistenceTestkit,
|
||||
protobuf,
|
||||
protobufV3,
|
||||
pki,
|
||||
remote,
|
||||
remoteTests,
|
||||
slf4j,
|
||||
stream,
|
||||
streamTestkit,
|
||||
streamTests,
|
||||
streamTestsTck,
|
||||
streamTyped,
|
||||
testkit)
|
||||
|
||||
lazy val aggregatedProjects: Seq[ProjectReference] = userProjects ++ List[ProjectReference](
|
||||
actorTests,
|
||||
actorTypedTests,
|
||||
benchJmh,
|
||||
docs,
|
||||
billOfMaterials,
|
||||
persistenceShared,
|
||||
persistenceTck,
|
||||
persistenceTypedTests,
|
||||
remoteTests,
|
||||
streamTests,
|
||||
streamTestsTck)
|
||||
|
||||
lazy val root = Project(id = "akka", base = file("."))
|
||||
.aggregate(aggregatedProjects: _*)
|
||||
.enablePlugins(PublishRsyncPlugin)
|
||||
|
|
@ -350,8 +353,7 @@ lazy val protobufV3 = akkaModule("akka-protobuf-v3")
|
|||
.withConfigurations(Vector(Compile)), // prevent original dependency to be added to pom as runtime dep
|
||||
packagedArtifact in (Compile, packageBin) := Scoped.mkTuple2(
|
||||
(artifact in (Compile, packageBin)).value,
|
||||
ReproducibleBuildsPlugin.postProcessJar(OsgiKeys.bundle.value)
|
||||
),
|
||||
ReproducibleBuildsPlugin.postProcessJar(OsgiKeys.bundle.value)),
|
||||
packageBin in Compile := ReproducibleBuildsPlugin
|
||||
.postProcessJar((assembly in Compile).value), // package by running assembly
|
||||
// Prevent cyclic task dependencies, see https://github.com/sbt/sbt-assembly/issues/365
|
||||
|
|
@ -555,6 +557,17 @@ lazy val coordination = akkaModule("akka-coordination")
|
|||
.settings(AutomaticModuleName.settings("akka.coordination"))
|
||||
.settings(OSGi.coordination)
|
||||
|
||||
lazy val billOfMaterials = Project("akka-bill-of-materials", file("akka-bill-of-materials"))
|
||||
.enablePlugins(BillOfMaterialsPlugin)
|
||||
.disablePlugins(MimaPlugin, AkkaDisciplinePlugin)
|
||||
// buildSettings and defaultSettings configure organization name, licenses, etc...
|
||||
.settings(AkkaBuild.buildSettings)
|
||||
.settings(AkkaBuild.defaultSettings)
|
||||
.settings(
|
||||
name := "akka-bom",
|
||||
bomIncludeProjects := userProjects,
|
||||
description := s"${description.value} (depending on Scala ${CrossVersion.binaryScalaVersion(scalaVersion.value)})")
|
||||
|
||||
def akkaModule(name: String): Project =
|
||||
Project(id = name, base = file(name))
|
||||
.enablePlugins(ReproducibleBuildsPlugin)
|
||||
|
|
|
|||
|
|
@ -17,30 +17,24 @@ object Publish extends AutoPlugin {
|
|||
override def trigger = allRequirements
|
||||
|
||||
override lazy val projectSettings = Seq(
|
||||
pomExtra := akkaPomExtra,
|
||||
publishTo := Some(akkaPublishTo.value),
|
||||
publishRsyncHost := "akkarepo@gustav.akka.io",
|
||||
credentials ++= akkaCredentials,
|
||||
organizationName := "Lightbend Inc.",
|
||||
organizationHomepage := Some(url("https://www.lightbend.com")),
|
||||
startYear := Some(2009),
|
||||
developers := List(
|
||||
Developer(
|
||||
"akka-contributors",
|
||||
"Akka Contributors",
|
||||
"akka.official@gmail.com",
|
||||
url("https://github.com/akka/akka/graphs/contributors"))),
|
||||
publishMavenStyle := true,
|
||||
pomIncludeRepository := { x =>
|
||||
false
|
||||
},
|
||||
defaultPublishTo := target.value / "repository")
|
||||
|
||||
def akkaPomExtra = {
|
||||
<inceptionYear>2009</inceptionYear>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>akka-contributors</id>
|
||||
<name>Akka Contributors</name>
|
||||
<email>akka.official@gmail.com</email>
|
||||
<url>https://github.com/akka/akka/graphs/contributors</url>
|
||||
</developer>
|
||||
</developers>
|
||||
}
|
||||
|
||||
private def akkaPublishTo = Def.setting {
|
||||
val key = new java.io.File(
|
||||
Option(System.getProperty("akka.gustav.key"))
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-multi-jvm" % "0.4.0")
|
|||
//#sbt-multi-jvm
|
||||
|
||||
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.6.0")
|
||||
addSbtPlugin("com.lightbend.sbt" % "sbt-bill-of-materials" % "1.0.0")
|
||||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
|
||||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.23")
|
||||
// sbt-osgi 0.9.5 is available but breaks including jdk9-only classes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue