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

View File

@ -14,17 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package sbt package sbt.dependencygraph
import internal._ import sbt.Defaults
import Classpaths._
import LibraryManagement._
import internal.util.JLine
/** Accessors to private[sbt] symbols. */ /** Accessors to private[sbt] symbols. */
object SbtAccess { object SbtAccess {
val unmanagedScalaInstanceOnly = Defaults.unmanagedScalaInstanceOnly 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