diff --git a/src/main/scala/sbt/Main.scala b/src/main/scala/sbt/Main.scala index 913c2010e..907115a6c 100755 --- a/src/main/scala/sbt/Main.scala +++ b/src/main/scala/sbt/Main.scala @@ -101,7 +101,7 @@ class xMain extends xsbti.AppMain private def startProject(project: Project, configuration: xsbti.AppConfiguration, remainingArguments: List[String], startTime: Long): xsbti.MainResult = { project.log.info("Building project " + project.name + " " + project.version.toString + " against Scala " + project.buildScalaVersion) - project.log.info(" using " + project.getClass.getName + " with sbt " + project.sbtVersion.value + " and Scala " + project.defScalaVersion.value) + project.log.info(" using " + project.getClass.getName + " with sbt " + ComponentManager.version + " and Scala " + project.defScalaVersion.value) processArguments(project, initialize(remainingArguments), configuration, startTime) match { case e: xsbti.Exit => diff --git a/src/main/scala/sbt/Project.scala b/src/main/scala/sbt/Project.scala index bfb1d284e..add3433e2 100644 --- a/src/main/scala/sbt/Project.scala +++ b/src/main/scala/sbt/Project.scala @@ -215,6 +215,9 @@ trait Project extends TaskManager with Dag[Project] with BasicEnvironment * from the version of Scala used to build the project (current version used is buildScalaVersion, available are in buildScalaVersions). * This property is only read by `sbt` on startup and reload.*/ final val defScalaVersion = propertyOptional[String](info.definitionScalaVersion) + /** The property to specify the sbt revision to use. + * Note that this can by a dynamic revision (see Ivy documentation for details on dynamic revisions). + *Therefore, use `sbt.ComponentManager.version` and `timestamp` for actual version information. */ final val sbtVersion = property[String] final val projectInitialize = propertyOptional[Boolean](false) final val projectScratch = propertyOptional[Boolean](false, true) @@ -223,9 +226,10 @@ trait Project extends TaskManager with Dag[Project] with BasicEnvironment * This property is only read by `sbt` on startup and reload. The definitive source for the version of Scala currently * being used is buildScalaVersion.*/ final val buildScalaVersions = propertyOptional[String](defScalaVersion.value, true) - /** The definitive source for the version of Scala being used to *build* the project.*/ + /** The definitive source for the version of Scala being requested to *build* the project. + * For the full version information, see buildScalaInstance.actualVersion.*/ def buildScalaVersion = info.buildScalaVersion.getOrElse(crossScalaVersions.first) - private[sbt] def isScala27 = buildScalaVersion.startsWith("2.7.") + private[sbt] def isScala27 = buildScalaInstance.actualVersion.startsWith("2.7.") def componentManager = new ComponentManager(info.launcher.globalLock, info.app.components, log)