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")
|
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
|
// 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,
|
actor,
|
||||||
actorTests,
|
|
||||||
actorTestkitTyped,
|
actorTestkitTyped,
|
||||||
actorTyped,
|
actorTyped,
|
||||||
actorTypedTests,
|
|
||||||
benchJmh,
|
|
||||||
cluster,
|
cluster,
|
||||||
clusterMetrics,
|
clusterMetrics,
|
||||||
clusterSharding,
|
clusterSharding,
|
||||||
|
|
@ -73,30 +70,36 @@ lazy val aggregatedProjects: Seq[ProjectReference] = List[ProjectReference](
|
||||||
coordination,
|
coordination,
|
||||||
discovery,
|
discovery,
|
||||||
distributedData,
|
distributedData,
|
||||||
docs,
|
|
||||||
jackson,
|
jackson,
|
||||||
multiNodeTestkit,
|
multiNodeTestkit,
|
||||||
osgi,
|
osgi,
|
||||||
persistence,
|
persistence,
|
||||||
persistenceQuery,
|
persistenceQuery,
|
||||||
persistenceShared,
|
|
||||||
persistenceTck,
|
|
||||||
persistenceTyped,
|
persistenceTyped,
|
||||||
persistenceTypedTests,
|
|
||||||
persistenceTestkit,
|
persistenceTestkit,
|
||||||
protobuf,
|
protobuf,
|
||||||
protobufV3,
|
protobufV3,
|
||||||
pki,
|
pki,
|
||||||
remote,
|
remote,
|
||||||
remoteTests,
|
|
||||||
slf4j,
|
slf4j,
|
||||||
stream,
|
stream,
|
||||||
streamTestkit,
|
streamTestkit,
|
||||||
streamTests,
|
|
||||||
streamTestsTck,
|
|
||||||
streamTyped,
|
streamTyped,
|
||||||
testkit)
|
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("."))
|
lazy val root = Project(id = "akka", base = file("."))
|
||||||
.aggregate(aggregatedProjects: _*)
|
.aggregate(aggregatedProjects: _*)
|
||||||
.enablePlugins(PublishRsyncPlugin)
|
.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
|
.withConfigurations(Vector(Compile)), // prevent original dependency to be added to pom as runtime dep
|
||||||
packagedArtifact in (Compile, packageBin) := Scoped.mkTuple2(
|
packagedArtifact in (Compile, packageBin) := Scoped.mkTuple2(
|
||||||
(artifact in (Compile, packageBin)).value,
|
(artifact in (Compile, packageBin)).value,
|
||||||
ReproducibleBuildsPlugin.postProcessJar(OsgiKeys.bundle.value)
|
ReproducibleBuildsPlugin.postProcessJar(OsgiKeys.bundle.value)),
|
||||||
),
|
|
||||||
packageBin in Compile := ReproducibleBuildsPlugin
|
packageBin in Compile := ReproducibleBuildsPlugin
|
||||||
.postProcessJar((assembly in Compile).value), // package by running assembly
|
.postProcessJar((assembly in Compile).value), // package by running assembly
|
||||||
// Prevent cyclic task dependencies, see https://github.com/sbt/sbt-assembly/issues/365
|
// 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(AutomaticModuleName.settings("akka.coordination"))
|
||||||
.settings(OSGi.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 =
|
def akkaModule(name: String): Project =
|
||||||
Project(id = name, base = file(name))
|
Project(id = name, base = file(name))
|
||||||
.enablePlugins(ReproducibleBuildsPlugin)
|
.enablePlugins(ReproducibleBuildsPlugin)
|
||||||
|
|
|
||||||
|
|
@ -17,30 +17,24 @@ object Publish extends AutoPlugin {
|
||||||
override def trigger = allRequirements
|
override def trigger = allRequirements
|
||||||
|
|
||||||
override lazy val projectSettings = Seq(
|
override lazy val projectSettings = Seq(
|
||||||
pomExtra := akkaPomExtra,
|
|
||||||
publishTo := Some(akkaPublishTo.value),
|
publishTo := Some(akkaPublishTo.value),
|
||||||
publishRsyncHost := "akkarepo@gustav.akka.io",
|
publishRsyncHost := "akkarepo@gustav.akka.io",
|
||||||
credentials ++= akkaCredentials,
|
credentials ++= akkaCredentials,
|
||||||
organizationName := "Lightbend Inc.",
|
organizationName := "Lightbend Inc.",
|
||||||
organizationHomepage := Some(url("https://www.lightbend.com")),
|
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,
|
publishMavenStyle := true,
|
||||||
pomIncludeRepository := { x =>
|
pomIncludeRepository := { x =>
|
||||||
false
|
false
|
||||||
},
|
},
|
||||||
defaultPublishTo := target.value / "repository")
|
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 {
|
private def akkaPublishTo = Def.setting {
|
||||||
val key = new java.io.File(
|
val key = new java.io.File(
|
||||||
Option(System.getProperty("akka.gustav.key"))
|
Option(System.getProperty("akka.gustav.key"))
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-multi-jvm" % "0.4.0")
|
||||||
//#sbt-multi-jvm
|
//#sbt-multi-jvm
|
||||||
|
|
||||||
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.6.0")
|
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("org.scalameta" % "sbt-scalafmt" % "2.4.2")
|
||||||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.23")
|
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.23")
|
||||||
// sbt-osgi 0.9.5 is available but breaks including jdk9-only classes
|
// sbt-osgi 0.9.5 is available but breaks including jdk9-only classes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue