crossPaths back to default (#27893)
* Releasing should go in same dir regardless of Scala version
This commit is contained in:
parent
e5772b1107
commit
91c294b286
2 changed files with 20 additions and 24 deletions
|
|
@ -16,15 +16,16 @@ object Publish extends AutoPlugin {
|
||||||
override def trigger = allRequirements
|
override def trigger = allRequirements
|
||||||
|
|
||||||
override lazy val projectSettings = Seq(
|
override lazy val projectSettings = Seq(
|
||||||
crossPaths := false,
|
|
||||||
pomExtra := akkaPomExtra,
|
pomExtra := akkaPomExtra,
|
||||||
publishTo := akkaPublishTo.value,
|
publishTo := akkaPublishTo.value,
|
||||||
credentials ++= akkaCredentials,
|
credentials ++= akkaCredentials,
|
||||||
organizationName := "Lightbend Inc.",
|
organizationName := "Lightbend Inc.",
|
||||||
organizationHomepage := Some(url("https://www.lightbend.com")),
|
organizationHomepage := Some(url("https://www.lightbend.com")),
|
||||||
publishMavenStyle := true,
|
publishMavenStyle := true,
|
||||||
pomIncludeRepository := { x => false },
|
pomIncludeRepository := { x =>
|
||||||
defaultPublishTo := crossTarget.value / "repository")
|
false
|
||||||
|
},
|
||||||
|
defaultPublishTo := target.value / "repository")
|
||||||
|
|
||||||
def akkaPomExtra = {
|
def akkaPomExtra = {
|
||||||
<inceptionYear>2009</inceptionYear>
|
<inceptionYear>2009</inceptionYear>
|
||||||
|
|
@ -39,14 +40,14 @@ object Publish extends AutoPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private def akkaPublishTo = Def.setting {
|
private def akkaPublishTo = Def.setting {
|
||||||
sonatypeRepo(version.value) orElse localRepo(defaultPublishTo.value)
|
sonatypeRepo(version.value).orElse(localRepo(defaultPublishTo.value))
|
||||||
}
|
}
|
||||||
|
|
||||||
private def sonatypeRepo(version: String): Option[Resolver] =
|
private def sonatypeRepo(version: String): Option[Resolver] =
|
||||||
Option(sys.props("publish.maven.central")) filter (_.toLowerCase == "true") map { _ =>
|
Option(sys.props("publish.maven.central")).filter(_.toLowerCase == "true").map { _ =>
|
||||||
val nexus = "https://oss.sonatype.org/"
|
val nexus = "https://oss.sonatype.org/"
|
||||||
if (version endsWith "-SNAPSHOT") "snapshots" at nexus + "content/repositories/snapshots"
|
if (version.endsWith("-SNAPSHOT")) "snapshots".at(nexus + "content/repositories/snapshots")
|
||||||
else "releases" at nexus + "service/local/staging/deploy/maven2"
|
else "releases".at(nexus + "service/local/staging/deploy/maven2")
|
||||||
}
|
}
|
||||||
|
|
||||||
private def localRepo(repository: File) =
|
private def localRepo(repository: File) =
|
||||||
|
|
@ -62,11 +63,8 @@ object Publish extends AutoPlugin {
|
||||||
object NoPublish extends AutoPlugin {
|
object NoPublish extends AutoPlugin {
|
||||||
override def requires = plugins.JvmPlugin
|
override def requires = plugins.JvmPlugin
|
||||||
|
|
||||||
override def projectSettings = Seq(
|
override def projectSettings =
|
||||||
skip in publish := true,
|
Seq(skip in publish := true, sources in (Compile, doc) := Seq.empty, whitesourceIgnore := true)
|
||||||
sources in (Compile, doc) := Seq.empty,
|
|
||||||
whitesourceIgnore := true
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
object DeployRsync extends AutoPlugin {
|
object DeployRsync extends AutoPlugin {
|
||||||
|
|
@ -83,12 +81,11 @@ object DeployRsync extends AutoPlugin {
|
||||||
object autoImport extends Keys
|
object autoImport extends Keys
|
||||||
import autoImport._
|
import autoImport._
|
||||||
|
|
||||||
override def projectSettings = Seq(
|
override def projectSettings =
|
||||||
deployRsync := {
|
Seq(deployRsync := {
|
||||||
val (_, host) = (Space ~ StringBasic).parsed
|
val (_, host) = (Space ~ StringBasic).parsed
|
||||||
deployRsyncArtifact.value.foreach {
|
deployRsyncArtifact.value.foreach {
|
||||||
case (from, to) => s"rsync -rvz $from/ $host:$to" !
|
case (from, to) => s"rsync -rvz $from/ $host:$to" !
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,9 @@ import com.lightbend.paradox.sbt.ParadoxKeys
|
||||||
object Release extends ParadoxKeys {
|
object Release extends ParadoxKeys {
|
||||||
val releaseDirectory = SettingKey[File]("release-directory")
|
val releaseDirectory = SettingKey[File]("release-directory")
|
||||||
|
|
||||||
lazy val settings: Seq[Setting[_]] = commandSettings ++ Seq(
|
lazy val settings: Seq[Setting[_]] = commandSettings ++ Seq(releaseDirectory := target.value / "release")
|
||||||
releaseDirectory := crossTarget.value / "release")
|
|
||||||
|
|
||||||
lazy val commandSettings = Seq(
|
lazy val commandSettings = Seq(commands ++= Seq(buildReleaseCommand, buildDocsCommand))
|
||||||
commands ++= Seq(buildReleaseCommand, buildDocsCommand))
|
|
||||||
|
|
||||||
def buildReleaseCommand = Command.command("buildRelease") { state =>
|
def buildReleaseCommand = Command.command("buildRelease") { state =>
|
||||||
val extracted = Project.extract(state)
|
val extracted = Project.extract(state)
|
||||||
|
|
@ -36,7 +34,8 @@ object Release extends ParadoxKeys {
|
||||||
|
|
||||||
def buildDocsCommand = Command.command("buildDocs") { state =>
|
def buildDocsCommand = Command.command("buildDocs") { state =>
|
||||||
if (!sys.props.contains("akka.genjavadoc.enabled"))
|
if (!sys.props.contains("akka.genjavadoc.enabled"))
|
||||||
throw new RuntimeException("Make sure you start sbt with \"-Dakka.genjavadoc.enabled=true\" otherwise no japi will be generated")
|
throw new RuntimeException(
|
||||||
|
"Make sure you start sbt with \"-Dakka.genjavadoc.enabled=true\" otherwise no japi will be generated")
|
||||||
val extracted = Project.extract(state)
|
val extracted = Project.extract(state)
|
||||||
// we want to build the api-docs and docs with the current "default" version of scala
|
// we want to build the api-docs and docs with the current "default" version of scala
|
||||||
val scalaV = extracted.get(scalaVersion)
|
val scalaV = extracted.get(scalaVersion)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue