mirror of https://github.com/sbt/sbt.git
commit
a151999016
|
|
@ -454,12 +454,7 @@ lazy val proguardedCli = Seq(
|
|||
Nil
|
||||
},
|
||||
addBootstrapInProguardedJar,
|
||||
packagedArtifacts ++= {
|
||||
if (scalaBinaryVersion.value == "2.11")
|
||||
Map(proguardedArtifact.value -> proguardedJar.value)
|
||||
else
|
||||
Map()
|
||||
}
|
||||
addProguardedJar
|
||||
)
|
||||
|
||||
lazy val sharedTestResources = {
|
||||
|
|
|
|||
|
|
@ -5,20 +5,27 @@ import sbt.Keys._
|
|||
object Publish {
|
||||
|
||||
lazy val dontPublish = Seq(
|
||||
publish := (),
|
||||
publishLocal := (),
|
||||
publish := {},
|
||||
publishLocal := {},
|
||||
publishArtifact := false
|
||||
)
|
||||
|
||||
def dontPublishIn(sbv: String*) = Seq(
|
||||
publish := {
|
||||
if (!sbv.contains(scalaBinaryVersion.value))
|
||||
publish.value
|
||||
},
|
||||
publishLocal := {
|
||||
if (!sbv.contains(scalaBinaryVersion.value))
|
||||
publishLocal.value
|
||||
},
|
||||
// Doesn't work, the second publish or publishLocal seem not to reference the previous implementation of the key.
|
||||
// This only seems to prevent ivy.xml files to be published locally anyway…
|
||||
// See also similar case in Settings.scala.
|
||||
// publish := Def.taskDyn {
|
||||
// if (sbv.contains(scalaBinaryVersion.value))
|
||||
// Def.task(())
|
||||
// else
|
||||
// publish
|
||||
// },
|
||||
// publishLocal := Def.taskDyn {
|
||||
// if (sbv.contains(scalaBinaryVersion.value))
|
||||
// Def.task(())
|
||||
// else
|
||||
// publishLocal
|
||||
// },
|
||||
publishArtifact := {
|
||||
!sbv.contains(scalaBinaryVersion.value) && publishArtifact.value
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ object Release {
|
|||
val log = toProcessLogger(state)
|
||||
|
||||
for ((f, output) <- scriptFiles) {
|
||||
sbt.Process(Seq(f.getAbsolutePath, "-f")).!!(state.log)
|
||||
sys.process.Process(Seq(f.getAbsolutePath, "-f")).!!(log)
|
||||
vcs.add(output.getAbsolutePath).!!(log)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ object Settings {
|
|||
Seq()
|
||||
}
|
||||
},
|
||||
javacOptions in Keys.doc := Seq()
|
||||
javacOptions.in(Keys.doc) := Seq()
|
||||
)
|
||||
|
||||
lazy val shared = javaScalaPluginShared ++ Seq(
|
||||
|
|
@ -113,8 +113,8 @@ object Settings {
|
|||
)
|
||||
|
||||
lazy val noTests = Seq(
|
||||
test in Test := (),
|
||||
testOnly in Test := ()
|
||||
test.in(Test) := {},
|
||||
testOnly.in(Test) := {}
|
||||
)
|
||||
|
||||
lazy val utest = Seq(
|
||||
|
|
@ -157,19 +157,28 @@ object Settings {
|
|||
|
||||
Seq(
|
||||
baseDirectory := {
|
||||
val baseDir = baseDirectory.value
|
||||
|
||||
if (sbtScalaVersionMatch.value)
|
||||
baseDirectory.value
|
||||
baseDir
|
||||
else
|
||||
baseDirectory.value / "target" / "dummy"
|
||||
},
|
||||
publish := {
|
||||
if (sbtScalaVersionMatch.value)
|
||||
publish.value
|
||||
},
|
||||
publishLocal := {
|
||||
if (sbtScalaVersionMatch.value)
|
||||
publishLocal.value
|
||||
baseDir / "target" / "dummy"
|
||||
},
|
||||
// Doesn't work, the second publish or publishLocal seem not to reference the previous implementation of the key.
|
||||
// This only seems to prevent ivy.xml files to be published locally anyway…
|
||||
// See also similar case in Publish.scala.
|
||||
// publish := Def.taskDyn {
|
||||
// if (sbtScalaVersionMatch.value)
|
||||
// publish
|
||||
// else
|
||||
// Def.task(())
|
||||
// },
|
||||
// publishLocal := Def.taskDyn {
|
||||
// if (sbtScalaVersionMatch.value)
|
||||
// publishLocal
|
||||
// else
|
||||
// Def.task(())
|
||||
// },
|
||||
publishArtifact := {
|
||||
sbtScalaVersionMatch.value && publishArtifact.value
|
||||
}
|
||||
|
|
@ -197,7 +206,7 @@ object Settings {
|
|||
sbtVersion := {
|
||||
scalaBinaryVersion.value match {
|
||||
case "2.10" => "0.13.8"
|
||||
case "2.12" => "1.0.0-RC3"
|
||||
case "2.12" => "1.0.1"
|
||||
case _ => sbtVersion.value
|
||||
}
|
||||
},
|
||||
|
|
@ -213,7 +222,7 @@ object Settings {
|
|||
lazy val shading =
|
||||
inConfig(_root_.coursier.ShadingPlugin.Shading)(PgpSettings.projectSettings) ++
|
||||
// ytf does this have to be repeated here?
|
||||
// Can't figure out why configuration get lost without this in particular...
|
||||
// Can't figure out why configuration gets lost without this in particular...
|
||||
_root_.coursier.ShadingPlugin.projectSettings ++
|
||||
Seq(
|
||||
shadingNamespace := "coursier.shaded",
|
||||
|
|
@ -245,6 +254,23 @@ object Settings {
|
|||
}
|
||||
}
|
||||
|
||||
lazy val addProguardedJar = {
|
||||
|
||||
val extra = Def.taskDyn[Map[Artifact, File]] {
|
||||
if (scalaBinaryVersion.value == "2.11")
|
||||
Def.task(Map(proguardedArtifact.value -> proguardedJar.value))
|
||||
else
|
||||
Def.task(Map())
|
||||
}
|
||||
|
||||
packagedArtifacts ++= {
|
||||
if (scalaBinaryVersion.value == "2.11")
|
||||
extra.value
|
||||
else
|
||||
Map()
|
||||
}
|
||||
}
|
||||
|
||||
lazy val Integration = config("it").extend(Test)
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue