summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-05-17 15:42:27 +1000
committerJason Zaugg <jzaugg@gmail.com>2016-05-17 15:42:27 +1000
commit512bf7a841a2c11723c6f4537a1d9ef401b88b9b (patch)
tree924f05971ba5d831d133ec4906588958ab8fc7ad
parentb3f8332cf399cd15067c879c8297c25598045883 (diff)
parent71a5bdaf57f90b46a6bed8af28deebb1174318c7 (diff)
downloadscala-512bf7a841a2c11723c6f4537a1d9ef401b88b9b.tar.gz
scala-512bf7a841a2c11723c6f4537a1d9ef401b88b9b.tar.bz2
scala-512bf7a841a2c11723c6f4537a1d9ef401b88b9b.zip
Merge pull request #5152 from retronym/topic/silencio
Eliminate major sources of daily noise in SBT build.
-rw-r--r--build.sbt20
-rw-r--r--project/Quiet.scala33
-rw-r--r--project/plugins.sbt2
3 files changed, 46 insertions, 9 deletions
diff --git a/build.sbt b/build.sbt
index 92dfffa9d5..984ac0e91c 100644
--- a/build.sbt
+++ b/build.sbt
@@ -4,8 +4,8 @@
* What you see below is very much work-in-progress. The following features are implemented:
* - Compiling all classses for the compiler and library ("compile" in the respective subprojects)
* - Running JUnit tests ("test") and partest ("test/it:test")
- * - Creating build-sbt/quick with all compiled classes and launcher scripts ("dist/mkQuick")
- * - Creating build-sbt/pack with all JARs and launcher scripts ("dist/mkPack")
+ * - Creating build/quick with all compiled classes and launcher scripts ("dist/mkQuick")
+ * - Creating build/pack with all JARs and launcher scripts ("dist/mkPack")
* - Building all scaladoc sets ("doc")
* - Publishing ("publishDists" and standard sbt tasks like "publish" and "publishLocal")
*
@@ -212,7 +212,9 @@ lazy val commonSettings = clearSourceAndResourceDirectories ++ publishSettings +
// Don't log process output (e.g. of forked `compiler/runMain ...Main`), just pass it
// directly to stdout
- outputStrategy in run := Some(StdoutOutput)
+ outputStrategy in run := Some(StdoutOutput),
+ Quiet.silenceScalaBinaryVersionWarning,
+ Quiet.silenceIvyUpdateInfoLogging
)
/** Extra post-processing for the published POM files. These are needed to create POMs that
@@ -503,6 +505,7 @@ lazy val replJlineEmbedded = Project("repl-jline-embedded", file(".") / "target"
JarJar(inputs, outdir, config)
}),
connectInput in run := true
+
)
.dependsOn(replJline)
@@ -705,8 +708,9 @@ lazy val root = (project in file("."))
.settings(
publish := {},
publishLocal := {},
- commands ++= ScriptCommands.all
- )
+ commands ++= ScriptCommands.all,
+ Quiet.silenceIvyUpdateInfoLogging
+)
.aggregate(library, forkjoin, reflect, compiler, interactive, repl, replJline, replJlineEmbedded,
scaladoc, scalap, actors, partestExtras, junit, libraryAll, scalaDist).settings(
sources in Compile := Seq.empty,
@@ -795,8 +799,8 @@ def configureAsForkOfJavaProject(project: Project): Project = {
lazy val buildDirectory = settingKey[File]("The directory where all build products go. By default ./build")
lazy val mkBin = taskKey[Seq[File]]("Generate shell script (bash or Windows batch).")
-lazy val mkQuick = taskKey[Unit]("Generate a full build, including scripts, in build-sbt/quick")
-lazy val mkPack = taskKey[Unit]("Generate a full build, including scripts, in build-sbt/pack")
+lazy val mkQuick = taskKey[Unit]("Generate a full build, including scripts, in build/quick")
+lazy val mkPack = taskKey[Unit]("Generate a full build, including scripts, in build/pack")
// Defining these settings is somewhat redundant as we also redefine settings that depend on them.
// However, IntelliJ's project import works better when these are set correctly.
@@ -855,7 +859,7 @@ def generateServiceProviderResources(services: (String, String)*): Setting[_] =
}
}.taskValue
-buildDirectory in ThisBuild := (baseDirectory in ThisBuild).value / "build-sbt"
+buildDirectory in ThisBuild := (baseDirectory in ThisBuild).value / "build"
// Add tab completion to partest
commands += Command("partest")(_ => PartestUtil.partestParser((baseDirectory in ThisBuild).value, (baseDirectory in ThisBuild).value / "test")) { (state, parsed) =>
diff --git a/project/Quiet.scala b/project/Quiet.scala
new file mode 100644
index 0000000000..de30ebe6ab
--- /dev/null
+++ b/project/Quiet.scala
@@ -0,0 +1,33 @@
+import sbt._
+import Keys._
+
+object Quiet {
+ // Workaround SBT issue described:
+ //
+ // https://github.com/scala/scala-dev/issues/100
+ def silenceScalaBinaryVersionWarning = ivyConfiguration := {
+ ivyConfiguration.value match {
+ case c: InlineIvyConfiguration =>
+ val delegate = c.log
+ val logger = new Logger {
+ override def trace(t: => Throwable): Unit = delegate.trace(t)
+ override def log(level: sbt.Level.Value, message: => String): Unit = {
+ level match {
+ case sbt.Level.Warn =>
+ val message0 = message
+ val newLevel = if (message.contains("differs from Scala binary version in project"))
+ delegate.log(sbt.Level.Debug, message)
+ else
+ delegate.log(level, message)
+ case _ => delegate.log(level, message)
+ }
+ }
+ override def success(message: => String): Unit = delegate.success(message)
+ }
+ new InlineIvyConfiguration(c.paths, c.resolvers, c.otherResolvers, c.moduleConfigurations, c.localOnly, c.lock, c.checksums, c.resolutionCacheDir, c.updateOptions, logger)
+ case x => x
+ }
+ }
+
+ def silenceIvyUpdateInfoLogging = logLevel in update := Level.Warn
+}
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 2d91c2306b..46203565b4 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,6 +1,6 @@
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.3.2"
-libraryDependencies += "org.pantsbuild" % "jarjar" % "1.6.0"
+libraryDependencies += "org.pantsbuild" % "jarjar" % "1.6.3"
libraryDependencies += "biz.aQute" % "bndlib" % "1.50.0"