Move more stuff from sbt-coursier to sbt-coursier-shared

So that these are picked by sbt-lm-coursier too
This commit is contained in:
Alexandre Archambault 2018-11-20 17:49:20 +01:00
parent 239d875048
commit a592ee587a
6 changed files with 9 additions and 8 deletions

View File

@ -3,7 +3,7 @@ package coursier.sbtcoursiershared
import coursier.core.{Configuration, Project, Publication}
import coursier.lmcoursier.SbtCoursierCache
import sbt.{AutoPlugin, Compile, Setting, TaskKey, Test, settingKey}
import sbt.Keys.clean
import sbt.Keys.{classpathTypes, clean}
object SbtCoursierShared extends AutoPlugin {
@ -32,7 +32,10 @@ object SbtCoursierShared extends AutoPlugin {
coursierGenerateIvyXml := true,
coursierProject := InputsTasks.coursierProjectTask.value,
coursierInterProjectDependencies := InputsTasks.coursierInterProjectDependenciesTask.value,
publicationsSetting(Seq(Compile, Test).map(c => c -> Configuration(c.name)))
publicationsSetting(Seq(Compile, Test).map(c => c -> Configuration(c.name))),
// Tests artifacts from Maven repositories are given this type.
// Adding it here so that these work straightaway.
classpathTypes += "test-jar"
) ++
IvyXml.generateIvyXmlSettings()

View File

@ -265,10 +265,7 @@ object CoursierPlugin extends AutoPlugin {
)
confs ++ extraSources.toSeq ++ extraDocs.toSeq
},
// Tests artifacts from Maven repositories are given this type.
// Adding it here so that these work straightaway.
classpathTypes += "test-jar"
}
)
override lazy val buildSettings = super.buildSettings ++ Seq(

View File

@ -11,7 +11,8 @@ object Main extends App {
.loadClass(clsName)
).toOption.nonEmpty
val classifierTest = classFound("org.jclouds.openstack.nova.functions.ParseServerFromJsonResponseTest")
val name = "org.jclouds.openstack.nova.functions.ParseServerFromJsonResponseTest"
val classifierTest = classFound(name)
assert(classifierTest, s"Couldn't find classifierTest")
assert(classifierTest, s"Couldn't find $name")
}