mirror of
https://github.com/sbt/sbt.git
synced 2026-09-05 01:03:36 +02:00
Better handling of attributes from SBT
This commit is contained in:
@@ -30,6 +30,8 @@ case class CommonOptions(
|
||||
repository: List[String],
|
||||
@HelpMessage("Do not add default repositories (~/.ivy2/local, and Central)")
|
||||
noDefault: Boolean = false,
|
||||
@HelpMessage("Modify names in Maven repository paths for SBT plugins")
|
||||
sbtPluginHack: Boolean = false,
|
||||
@HelpMessage("Force module version")
|
||||
@ValueDescription("organization:name:forcedVersion")
|
||||
@ExtraName("V")
|
||||
|
||||
@@ -114,10 +114,19 @@ class Helper(
|
||||
sys.exit(255)
|
||||
}
|
||||
|
||||
val repositories =
|
||||
val repositories1 =
|
||||
(if (common.noDefault) Nil else defaultRepositories) ++
|
||||
repositories0.collect { case Right(r) => r }
|
||||
|
||||
val repositories =
|
||||
if (common.sbtPluginHack)
|
||||
repositories1.map {
|
||||
case m: MavenRepository => m.copy(sbtAttrStub = true)
|
||||
case other => other
|
||||
}
|
||||
else
|
||||
repositories1
|
||||
|
||||
val (rawDependencies, extraArgs) = {
|
||||
val idxOpt = Some(remainingArgs.indexOf("--")).filter(_ >= 0)
|
||||
idxOpt.fold((remainingArgs, Seq.empty[String])) { idx =>
|
||||
|
||||
Reference in New Issue
Block a user