=sbt Apply the build sbt messages but disable on sub projects. (#31352)
This commit is contained in:
parent
d4ede3d334
commit
146cc1af0f
2 changed files with 40 additions and 33 deletions
30
build.sbt
30
build.sbt
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -4,15 +4,18 @@
|
|||
|
||||
package akka
|
||||
|
||||
import java.io.{ FileInputStream, InputStreamReader }
|
||||
import java.util.Properties
|
||||
import akka.JdkOptions.autoImport._
|
||||
import com.lightbend.paradox.projectinfo.ParadoxProjectInfoPluginKeys._
|
||||
import com.typesafe.sbt.MultiJvmPlugin.autoImport.MultiJvm
|
||||
import sbtassembly.AssemblyPlugin.autoImport._
|
||||
|
||||
import sbt.Def
|
||||
import sbt.Keys._
|
||||
import sbt._
|
||||
import JdkOptions.autoImport._
|
||||
import sbtassembly.AssemblyPlugin.autoImport._
|
||||
import sbtwelcome.WelcomePlugin.autoImport._
|
||||
|
||||
import java.io.FileInputStream
|
||||
import java.io.InputStreamReader
|
||||
import java.util.Properties
|
||||
|
||||
object AkkaBuild {
|
||||
|
||||
|
|
@ -259,6 +262,36 @@ object AkkaBuild {
|
|||
}
|
||||
})
|
||||
|
||||
lazy val welcomeSettings: Seq[Setting[_]] = Def.settings {
|
||||
import sbtwelcome._
|
||||
Seq(
|
||||
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")))
|
||||
}
|
||||
|
||||
private def optionalDir(path: String): Option[File] =
|
||||
Option(path).filter(_.nonEmpty).map { path =>
|
||||
val dir = new File(path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue