Merge pull request #572 from dotta/issue/config-deps-resoulution-test

Test resolution for distinct configurations is run separately.
This commit is contained in:
Alexandre Archambault 2017-06-08 13:03:59 +02:00 committed by GitHub
commit d38dcbfc56
5 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,5 @@
name := "config-deps-resolution"
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-api" % "1.7.2",
"ch.qos.logback" % "logback-classic" % "1.1.1"
)

View File

@ -0,0 +1,11 @@
{
val pluginVersion = sys.props.getOrElse(
"plugin.version",
throw new RuntimeException(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
)
)
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
}

View File

@ -0,0 +1,19 @@
package sbt
import sbt._
import Keys._
object MyPlugin extends AutoPlugin {
override def requires = plugins.JvmPlugin
override def trigger = allRequirements
val FooConfig = config("foo")
override def projectSettings = Seq(
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-api" % "1.7.0",
"ch.qos.logback" % "logback-classic" % "1.1.7"
).map(_ % FooConfig),
ivyConfigurations += FooConfig
)
}

View File

@ -0,0 +1,6 @@
import ch.qos.logback.classic.BasicConfigurator
import ch.qos.logback.classic.LoggerContext
object GcMetricsApp extends App {
BasicConfigurator.configure(new LoggerContext())
}

View File

@ -0,0 +1,2 @@
> compile