mirror of https://github.com/sbt/sbt.git
deprecate alternative project directory name '.sbt'
This commit is contained in:
parent
66505d0b4a
commit
a0300cd3b3
|
|
@ -287,11 +287,16 @@ object BuildPaths
|
||||||
|
|
||||||
def projectStandard(base: File) = base / "project"
|
def projectStandard(base: File) = base / "project"
|
||||||
def projectHidden(base: File) = base / ConfigDirectoryName
|
def projectHidden(base: File) = base / ConfigDirectoryName
|
||||||
def selectProjectDir(base: File) =
|
def selectProjectDir(base: File, log: Logger) =
|
||||||
{
|
{
|
||||||
val a = projectHidden(base)
|
val a = projectHidden(base)
|
||||||
val b = projectStandard(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"
|
final val PluginsDirectoryName = "plugins"
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,7 @@ object Load
|
||||||
def loadUnit(uri: URI, localBase: File, s: State, config: LoadBuildConfiguration): BuildUnit =
|
def loadUnit(uri: URI, localBase: File, s: State, config: LoadBuildConfiguration): BuildUnit =
|
||||||
{
|
{
|
||||||
val normBase = localBase.getCanonicalFile
|
val normBase = localBase.getCanonicalFile
|
||||||
val defDir = selectProjectDir(normBase)
|
val defDir = selectProjectDir(normBase, config.log)
|
||||||
val pluginDir = pluginDirectory(defDir)
|
val pluginDir = pluginDirectory(defDir)
|
||||||
val (plugs, defs) = if(pluginDir.exists) loadUnitOld(defDir, pluginDir, s, config) else loadUnitNew(defDir, s, config)
|
val (plugs, defs) = if(pluginDir.exists) loadUnitOld(defDir, pluginDir, s, config) else loadUnitNew(defDir, s, config)
|
||||||
new BuildUnit(uri, normBase, defs, plugs)
|
new BuildUnit(uri, normBase, defs, plugs)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue