mirror of
https://github.com/sbt/sbt.git
synced 2026-09-03 08:13:48 +02:00
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:
+3
-1
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user