Move SbtAccess to our own package below sbt to prevent accidental namespace clashes with other plugins / sbt

This commit is contained in:
Johannes Rudolph 2017-10-23 16:44:15 +02:00
parent cfa9f462cf
commit e813b28a1c
3 changed files with 6 additions and 9 deletions

View File

@ -5,6 +5,8 @@
*/
package net.virtualvoid.sbt.graph.util
import sbt.dependencygraph.SbtAccess
object AsciiTreeLayout {
// [info] foo
// [info] +-bar
@ -52,7 +54,7 @@ object AsciiTreeLayout {
}
def defaultColumnSize: Int = {
val termWidth = sbt.SbtAccess.getTerminalWidth
val termWidth = SbtAccess.getTerminalWidth
if (termWidth > 20) termWidth - 8
else 80 // ignore termWidth
}

View File

@ -14,17 +14,13 @@
* limitations under the License.
*/
package sbt
package sbt.dependencygraph
import internal._
import Classpaths._
import LibraryManagement._
import internal.util.JLine
import sbt.Defaults
/** Accessors to private[sbt] symbols. */
object SbtAccess {
val unmanagedScalaInstanceOnly = Defaults.unmanagedScalaInstanceOnly
def getTerminalWidth: Int = JLine.usingTerminal(_.getWidth)
def getTerminalWidth: Int = sbt.internal.util.JLine.usingTerminal(_.getWidth)
}

View File

@ -1 +0,0 @@
sbt.version=0.13.6