mirror of https://github.com/sbt/sbt.git
Default sbt.version in loader is now automatically defined by build
git-svn-id: https://simple-build-tool.googlecode.com/svn/trunk@1044 d89573ee-9141-11dd-94d4-bdf5e562f29c
This commit is contained in:
parent
52708b88b7
commit
f167c3a9b0
|
|
@ -48,9 +48,9 @@ private object ProjectProperties
|
|||
/** The default version of the new user project when the user doesn't explicitly specify a version when prompted.*/
|
||||
val DefaultVersion = "1.0"
|
||||
/** The default version of sbt when the user doesn't explicitly specify a version when prompted.*/
|
||||
val DefaultSbtVersion = "0.5.4"
|
||||
val DefaultSbtVersion = DefaultVersions.Sbt //"0.5.4"
|
||||
/** The default version of Scala when the user doesn't explicitly specify a version when prompted.*/
|
||||
val DefaultScalaVersion = "2.7.5"
|
||||
val DefaultScalaVersion = DefaultVersions.Scala//"2.7.5"
|
||||
|
||||
// sets up the project properties for a throwaway project (flattens src and lib to the root project directory)
|
||||
def scratch(file: File)
|
||||
|
|
|
|||
|
|
@ -122,9 +122,28 @@ protected/* removes the ambiguity as to which project is the entry point by maki
|
|||
| public protected *;
|
||||
|}
|
||||
""".stripMargin
|
||||
|
||||
def managedSrc = path("src_managed")
|
||||
def defaultVersionPath = managedSrc / "DefaultVersions.scala"
|
||||
override def mainSourceRoots = super.mainSourceRoots +++ managedSrc
|
||||
override def compileAction = super.compileAction dependsOn(versionProperties)
|
||||
override def cleanAction = cleanTask(outputPath +++ managedSrc, cleanOptions)
|
||||
lazy val versionProperties = task { writeVersionProperties(projectVersion.value.toString, scalaVersion.value.toString) }
|
||||
def writeVersionProperties(sbtVersion: String, scalaVersion: String) =
|
||||
FileUtilities.write(defaultVersionPath.asFile, defaultVersions(sbtVersion, scalaVersion), log)
|
||||
|
||||
def defaultVersions(sbtVersion: String, scalaVersion: String) =
|
||||
"""
|
||||
package sbt.boot
|
||||
object DefaultVersions
|
||||
{
|
||||
val Sbt = "%s"
|
||||
val Scala = "%s"
|
||||
}
|
||||
""".format(sbtVersion, scalaVersion)
|
||||
}
|
||||
object LoaderProject
|
||||
{
|
||||
val ProguardDescription = "Produces the final compacted jar that contains only the minimum classes needed using proguard."
|
||||
val WriteProguardDescription = "Creates the configuration file to use with proguard."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue