mirror of https://github.com/sbt/sbt.git
add scripted test for Hydra plugin
This commit is contained in:
parent
0ff97e4561
commit
67eeffe765
|
|
@ -0,0 +1,5 @@
|
|||
package example
|
||||
|
||||
object Hello extends App {
|
||||
println("Hello!")
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
ThisBuild / scalaVersion := "2.12.8"
|
||||
|
||||
lazy val check = taskKey[Unit]("")
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
name := "hello",
|
||||
check := {
|
||||
val rs = scalaCompilerBridgeResolvers.value
|
||||
assert(rs.exists(r => r.name == "Triplequote Maven Releases"))
|
||||
}
|
||||
)
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package sbtmyplugin
|
||||
|
||||
import sbt._
|
||||
import sbt.Keys._
|
||||
|
||||
object HydraPlugin extends AutoPlugin {
|
||||
override def requires: Plugins = plugins.JvmPlugin
|
||||
override def trigger: PluginTrigger = allRequirements
|
||||
|
||||
override lazy val projectSettings = Seq(
|
||||
resolvers += "Triplequote Maven Releases" at "https://repo.triplequote.com/artifactory/libs-release/",
|
||||
) ++ inConfig(Compile)(compileSettings) ++ inConfig(Test)(compileSettings)
|
||||
|
||||
private lazy val compileSettings: Seq[Def.Setting[_]] = inTask(compile)(compileInputsSettings)
|
||||
|
||||
private def compileInputsSettings: Seq[Setting[_]] = Seq(
|
||||
scalaCompilerBridgeSource := {
|
||||
ModuleID("com.triplequote", "hydra-bridge_1_0", "2.1.4")
|
||||
.withConfigurations(Some(Configurations.Compile.name))
|
||||
.sources()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
> check
|
||||
Loading…
Reference in New Issue