=sbt Apply the build sbt messages but disable on sub projects. (#31352)

This commit is contained in:
kerr 2022-04-21 21:50:07 +08:00 committed by GitHub
parent d4ede3d334
commit 146cc1af0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 33 deletions

View file

@ -23,34 +23,6 @@ addCommandAlias(
addCommandAlias(name = "sortImports", value = ";scalafixEnable; scalafixAll SortImports; scalafmtAll")
import sbtwelcome._
logo :=
s"""
|_______ ______ ______
|___ |___ /_____ /________ _
|__ /| |__ //_/__ //_/_ __ `/
|_ ___ |_ ,< _ ,< / /_/ /
|/_/ |_|/_/|_| /_/|_| \\__,_/ ${version.value}
|
|""".stripMargin
logoColor := scala.Console.BLUE
usefulTasks := Seq(
UsefulTask("", "compile", "Compile the current project"),
UsefulTask("", "test", "Run all the tests "),
UsefulTask("", "testOnly *.AnySpec", "Only run a selected test"),
UsefulTask("", "verifyCodeStyle", "Verify code style"),
UsefulTask("", "applyCodeStyle", "Apply code style"),
UsefulTask("", "sortImports", "Sort the imports"),
UsefulTask("", "mimaReportBinaryIssues ", "Check binary issues"),
UsefulTask("", "validatePullRequest ", "Validate pull request"),
UsefulTask("", "akka-docs/paradox", "Build documentation"),
UsefulTask("", "akka-docs/paradoxBrowse", "Browse the generated documentation"),
UsefulTask("", "tips:", "prefix commands with `+` to run against cross Scala versions."),
UsefulTask("", "Contributing guide:", "https://github.com/akka/akka/blob/main/CONTRIBUTING.md"))
import akka.AkkaBuild._
import akka.{ AkkaBuild, Dependencies, OSGi, Protobuf, SigarLoader, VersionGenerator }
import com.typesafe.sbt.MultiJvmPlugin.MultiJvmKeys.MultiJvm
@ -128,6 +100,7 @@ lazy val root = Project(id = "akka", base = file("."))
docs,
serialversionRemoverPlugin))
.settings(Compile / headerCreate / unmanagedSources := (baseDirectory.value / "project").**("*.scala").get)
.settings(akka.AkkaBuild.welcomeSettings)
.enablePlugins(CopyrightHeaderForBuild)
lazy val actor = akkaModule("akka-actor")
@ -624,6 +597,7 @@ lazy val serialversionRemoverPluginSettings = Seq(
def akkaModule(name: String): Project =
Project(id = name, base = file(name))
.enablePlugins(ReproducibleBuildsPlugin)
.disablePlugins(WelcomePlugin)
.settings(akka.AkkaBuild.buildSettings)
.settings(akka.AkkaBuild.defaultSettings)
.enablePlugins(BootstrapGenjavadoc)