mirror of https://github.com/sbt/sbt.git
Drop File/Seq[File] setting enrichments
This commit is contained in:
parent
4a08b65cb2
commit
0d32f6fc76
|
|
@ -5,10 +5,6 @@ package sbt
|
|||
|
||||
import scala.language.experimental.macros
|
||||
|
||||
import java.io.File
|
||||
|
||||
import sbt.io.{ FileFilter, PathFinder }
|
||||
import sbt.io.syntax._
|
||||
import sbt.internal.util.Types._
|
||||
import sbt.internal.util.{ ~>, AList, AttributeKey, Settings, SourcePosition }
|
||||
import sbt.util.OptJsonWriter
|
||||
|
|
@ -271,29 +267,6 @@ object Scoped {
|
|||
def dependOn: Initialize[Task[Unit]] = Initialize.joinAny[Task](keys).apply(deps => nop.dependsOn(deps: _*))
|
||||
}
|
||||
|
||||
implicit def richFileSetting(s: SettingKey[File]): RichFileSetting = new RichFileSetting(s)
|
||||
implicit def richFilesSetting(s: SettingKey[Seq[File]]): RichFilesSetting = new RichFilesSetting(s)
|
||||
|
||||
final class RichFileSetting(s: SettingKey[File]) extends RichFileBase {
|
||||
@deprecated("Use a standard setting definition.", "0.13.0")
|
||||
def /(c: String): Initialize[File] = s { _ / c }
|
||||
protected[this] def map0(f: PathFinder => PathFinder) = s(file => finder(f)(file :: Nil))
|
||||
}
|
||||
final class RichFilesSetting(s: SettingKey[Seq[File]]) extends RichFileBase {
|
||||
@deprecated("Use a standard setting definition.", "0.13.0")
|
||||
def /(s: String): Initialize[Seq[File]] = map0 { _ / s }
|
||||
protected[this] def map0(f: PathFinder => PathFinder) = s(finder(f))
|
||||
}
|
||||
sealed abstract class RichFileBase {
|
||||
@deprecated("Use a standard setting definition.", "0.13.0")
|
||||
def *(filter: FileFilter): Initialize[Seq[File]] = map0 { _ * filter }
|
||||
@deprecated("Use a standard setting definition.", "0.13.0")
|
||||
def **(filter: FileFilter): Initialize[Seq[File]] = map0 { _ ** filter }
|
||||
protected[this] def map0(f: PathFinder => PathFinder): Initialize[Seq[File]]
|
||||
protected[this] def finder(f: PathFinder => PathFinder): Seq[File] => Seq[File] =
|
||||
in => f(in).get
|
||||
}
|
||||
|
||||
// this is the least painful arrangement I came up with
|
||||
@deprecated("The sbt 0.10 style DSL is deprecated: '(k1, k2) map { (x, y) => ... }' should now be '{ val x = k1.value; val y = k2.value }'.\nSee http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html", "0.13.13") implicit def t2ToTable2[A, B](t2: (ScopedTaskable[A], ScopedTaskable[B])): RichTaskable2[A, B] = new RichTaskable2(t2)
|
||||
@deprecated("The sbt 0.10 style DSL is deprecated: '(k1, k2) map { (x, y) => ... }' should now be '{ val x = k1.value; val y = k2.value }'.\nSee http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html", "0.13.13") implicit def t3ToTable3[A, B, C](t3: (ScopedTaskable[A], ScopedTaskable[B], ScopedTaskable[C])): RichTaskable3[A, B, C] = new RichTaskable3(t3)
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ lazy val a = (project in file(".")).
|
|||
settings(externalIvySettings()) dependsOn(b)
|
||||
|
||||
lazy val b = (project in file("b")).
|
||||
settings(externalIvySettings( (baseDirectory in ThisBuild) / "ivysettings.xml" ))
|
||||
settings(externalIvySettings( Def setting ((baseDirectory in ThisBuild).value / "ivysettings.xml") ))
|
||||
|
|
|
|||
Loading…
Reference in New Issue