deprecate alternative project directory name '.sbt'

This commit is contained in:
Mark Harrah 2012-01-15 12:29:53 -05:00
parent 66505d0b4a
commit a0300cd3b3
2 changed files with 8 additions and 3 deletions

View File

@ -287,11 +287,16 @@ object BuildPaths
def projectStandard(base: File) = base / "project"
def projectHidden(base: File) = base / ConfigDirectoryName
def selectProjectDir(base: File) =
def selectProjectDir(base: File, log: Logger) =
{
val a = projectHidden(base)
val b = projectStandard(base)
if(a.exists) a else b
if(a.exists)
{
log.warn("Alternative project directory " + ConfigDirectoryName + " (" + a + ") has been deprecated since sbt 0.12.0.\n Please use the standard location: " + b)
a
}
else b
}
final val PluginsDirectoryName = "plugins"

View File

@ -373,7 +373,7 @@ object Load
def loadUnit(uri: URI, localBase: File, s: State, config: LoadBuildConfiguration): BuildUnit =
{
val normBase = localBase.getCanonicalFile
val defDir = selectProjectDir(normBase)
val defDir = selectProjectDir(normBase, config.log)
val pluginDir = pluginDirectory(defDir)
val (plugs, defs) = if(pluginDir.exists) loadUnitOld(defDir, pluginDir, s, config) else loadUnitNew(defDir, s, config)
new BuildUnit(uri, normBase, defs, plugs)