mirror of https://github.com/sbt/sbt.git
Credentials should be kept in SBT's own global base location
The old convention of keeping credentials in ~/.ivy2 isn't recommended anymore, they can instead go in (customizable) global base location. The global base defaults to `~/.sbt`, hence credentials go in `~/.sbt/.credentials` (c.f. `Keys.globalBaseDirectory` and system property `sbt.global.base`)
This commit is contained in:
parent
14d4e41a15
commit
7b97b6833f
|
|
@ -29,5 +29,7 @@ object DefaultOptions {
|
|||
def scalac: Seq[String] = compile.encoding("UTF-8")
|
||||
def javadoc(name: String, version: String): Seq[String] = Seq("-doctitle", "%s %s API".format(name, version))
|
||||
def scaladoc(name: String, version: String): Seq[String] = doc.title(name) ++ doc.version(version)
|
||||
def credentials: Credentials = Credentials(userHome / ".sbt" / ".credentials")
|
||||
@deprecated("Use `credentials(State)` instead.", "0.12.0")
|
||||
def credentials: Credentials = Credentials(userHome / ".ivy2" / ".credentials")
|
||||
def credentials(s: State): Credentials = Credentials(BuildPaths.getGlobalBase(s) / ".credentials")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue