mirror of https://github.com/sbt/sbt.git
commit
677725dc3f
|
|
@ -15,6 +15,8 @@ import dataclass.data
|
||||||
object ModuleMatchers {
|
object ModuleMatchers {
|
||||||
def all: ModuleMatchers =
|
def all: ModuleMatchers =
|
||||||
ModuleMatchers(Set.empty, Set.empty)
|
ModuleMatchers(Set.empty, Set.empty)
|
||||||
|
def only(organization: String, moduleName: String): ModuleMatchers =
|
||||||
|
ModuleMatchers(Set.empty, Set(Module(Organization(organization), ModuleName(moduleName), Map())), includeByDefault = false)
|
||||||
def only(mod: Module): ModuleMatchers =
|
def only(mod: Module): ModuleMatchers =
|
||||||
ModuleMatchers(Set.empty, Set(mod), includeByDefault = false)
|
ModuleMatchers(Set.empty, Set(mod), includeByDefault = false)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ object LmCoursierPlugin extends AutoPlugin {
|
||||||
Def.task(sbt.hack.Foo.updateTask(lm).value)
|
Def.task(sbt.hack.Foo.updateTask(lm).value)
|
||||||
}.value
|
}.value
|
||||||
) ++
|
) ++
|
||||||
|
setCsrConfiguration ++
|
||||||
inTask(updateClassifiers)(
|
inTask(updateClassifiers)(
|
||||||
Seq(
|
Seq(
|
||||||
dependencyResolution := mkDependencyResolution.value,
|
dependencyResolution := mkDependencyResolution.value,
|
||||||
|
|
@ -86,6 +87,21 @@ object LmCoursierPlugin extends AutoPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private def setCsrConfiguration: Seq[Setting[_]] = {
|
||||||
|
val csrConfigurationOpt = try {
|
||||||
|
val key = sbt.Keys.asInstanceOf[{
|
||||||
|
def csrConfiguration: TaskKey[CoursierConfiguration]
|
||||||
|
}].csrConfiguration
|
||||||
|
Some(key)
|
||||||
|
} catch {
|
||||||
|
case _: NoSuchMethodException =>
|
||||||
|
None
|
||||||
|
}
|
||||||
|
|
||||||
|
csrConfigurationOpt.toSeq.map { csrConfiguration =>
|
||||||
|
csrConfiguration := coursierConfiguration.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private def mkCoursierConfiguration(withClassifiers: Boolean = false, sbtClassifiers: Boolean = false): Def.Initialize[Task[CoursierConfiguration]] =
|
private def mkCoursierConfiguration(withClassifiers: Boolean = false, sbtClassifiers: Boolean = false): Def.Initialize[Task[CoursierConfiguration]] =
|
||||||
Def.taskDyn {
|
Def.taskDyn {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue