-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
69 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,40 @@ | ||
package sbtbuildinfo | ||
|
||
import java.nio.file.{ Path => NioPath } | ||
import sbt.* | ||
import scala.language.higherKinds | ||
import scala.annotation.nowarn | ||
|
||
object PluginCompat { | ||
type FileRef = java.io.File | ||
type Out = java.io.File | ||
type Entry[A1] = sbtbuildinfo.BuildInfoKey.Entry[A1] | ||
|
||
val Setting = BuildInfoKey.Setting | ||
val Task = BuildInfoKey.Task | ||
val TaskValue = BuildInfoKey.TaskValue | ||
val Constant = BuildInfoKey.Constant | ||
val Mapped = BuildInfoKey.Mapped | ||
val Action = BuildInfoKey.Action | ||
|
||
trait BuildInfoKeys0 | ||
object BuildInfoKeys0 extends BuildInfoKeys0 | ||
|
||
def toClasspath(cp: Vector[NioPath]): Seq[Attributed[File]] = | ||
cp.map((x) => Attributed.blank(x.toFile())) | ||
|
||
implicit class RichScope(scope: Scope) { | ||
@nowarn | ||
def rescope(ref: Reference): Scope = scope.in(ref) | ||
} | ||
implicit class RichRichTaskable4[A1, A2, A3, A4]( | ||
val taskable: Scoped.RichTaskable4[A1, A2, A3, A4]) { | ||
def flatMapN[R](f: (A1, A2, A3, A4) => Task[R]) = | ||
taskable.flatMap(f) | ||
} | ||
implicit class RichRichTaskable11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11]( | ||
val taskable: Scoped.RichTaskable11[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11]) { | ||
def flatMapN[R](f: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) => Task[R]) = | ||
taskable.flatMap(f) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters