mirror of https://github.com/sbt/sbt.git
Test for automatic handling of AutoImport, AutoPlugin, and Build from binary plugins.
This commit is contained in:
parent
09c76f29a3
commit
359170b0f4
|
|
@ -0,0 +1,23 @@
|
|||
import sbt._
|
||||
import Keys._
|
||||
|
||||
|
||||
object C extends AutoImport {
|
||||
lazy val aN = Nature("A")
|
||||
lazy val bN = Nature("B")
|
||||
lazy val check = taskKey[Unit]("Checks that the AutoPlugin and Build are automatically added.")
|
||||
}
|
||||
|
||||
import C._
|
||||
|
||||
object A extends AutoPlugin {
|
||||
override def provides = aN
|
||||
override def select = bN
|
||||
override def projectSettings = Seq(
|
||||
check := {}
|
||||
)
|
||||
}
|
||||
|
||||
object B extends Build {
|
||||
lazy val extra = project.addNatures(bN)
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
sbtPlugin := true
|
||||
|
||||
name := "demo-plugin"
|
||||
|
|
@ -0,0 +1 @@
|
|||
addSbtPlugin("org.example" % "demo-plugin" % "3.4")
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
organization in ThisBuild := "org.example"
|
||||
|
||||
version in ThisBuild := "3.4"
|
||||
|
||||
lazy val define = project
|
||||
|
||||
lazy val use = project
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
$ copy-file changes/define/build.sbt build.sbt
|
||||
$ copy-file changes/define/A.scala A.scala
|
||||
|
||||
# reload implied
|
||||
> publishLocal
|
||||
|
||||
$ delete build.sbt A.scala
|
||||
$ copy-file changes/use/plugins.sbt project/plugins.sbt
|
||||
> reload
|
||||
> extra/check
|
||||
Loading…
Reference in New Issue