Update to several SBT plugins
This commit is contained in:
parent
941d0c7cb7
commit
f216c5da9f
@ -1,7 +1,7 @@
|
|||||||
import sbt._
|
import sbt._
|
||||||
import Keys._
|
import Keys._
|
||||||
|
|
||||||
import com.typesafe.sbt.SbtSite.site
|
import com.typesafe.sbt.site._
|
||||||
import sbtrelease.ReleasePlugin.autoImport._
|
import sbtrelease.ReleasePlugin.autoImport._
|
||||||
import com.typesafe.sbt.SbtPgp.autoImport._
|
import com.typesafe.sbt.SbtPgp.autoImport._
|
||||||
|
|
||||||
@ -82,30 +82,33 @@ object BuildSettings extends Basics {
|
|||||||
if (deprecation) Seq("-Xlint:deprecation") else Seq.empty
|
if (deprecation) Seq("-Xlint:deprecation") else Seq.empty
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Site setup */
|
/** A wrapper so we can call `commonSettings()` on a project. */
|
||||||
lazy val siteSettings = site.settings ++ site.includeScaladoc()
|
implicit class ProjectSettingsHelper(p: Project) {
|
||||||
|
def commonSettings() = siteSettings(p).settings(buildSettings: _*)
|
||||||
|
|
||||||
val buildSettings = buildMetadata ++
|
private[this] def siteSettings(p: Project) = p.enablePlugins(SiteScaladocPlugin)
|
||||||
siteSettings ++
|
|
||||||
projectMainClass.toSeq.map(mainClass := Some(_)) ++
|
|
||||||
Seq (
|
|
||||||
organization := buildOrganization,
|
|
||||||
organizationName := buildOrganizationName,
|
|
||||||
organizationHomepage := buildOrganizationUrl map { url _ },
|
|
||||||
|
|
||||||
scalaVersion := buildScalaVersion,
|
private[this] val buildSettings = buildMetadata ++
|
||||||
crossScalaVersions := buildScalaVersions,
|
projectMainClass.toSeq.map(mainClass := Some(_)) ++
|
||||||
|
Seq (
|
||||||
|
organization := buildOrganization,
|
||||||
|
organizationName := buildOrganizationName,
|
||||||
|
organizationHomepage := buildOrganizationUrl map { url _ },
|
||||||
|
|
||||||
scalacOptions ++= buildScalacOptions,
|
scalaVersion := buildScalaVersion,
|
||||||
javacOptions ++= buildJavacOptions,
|
crossScalaVersions := buildScalaVersions,
|
||||||
autoAPIMappings := true,
|
|
||||||
|
|
||||||
updateOptions := updateOptions.value.withCachedResolution(cachedResolution),
|
scalacOptions ++= buildScalacOptions,
|
||||||
parallelExecution := parallelBuild,
|
javacOptions ++= buildJavacOptions,
|
||||||
|
autoAPIMappings := true,
|
||||||
|
|
||||||
evictionWarningOptions in update :=
|
updateOptions := updateOptions.value.withCachedResolution(cachedResolution),
|
||||||
EvictionWarningOptions.default.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false).withWarnScalaVersionEviction(false)
|
parallelExecution := parallelBuild,
|
||||||
)
|
|
||||||
|
evictionWarningOptions in update :=
|
||||||
|
EvictionWarningOptions.default.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false).withWarnScalaVersionEviction(false)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object Helpers {
|
object Helpers {
|
||||||
@ -308,7 +311,7 @@ object UtilsBuild extends Build {
|
|||||||
import Helpers._
|
import Helpers._
|
||||||
|
|
||||||
lazy val root = (project in file ("."))
|
lazy val root = (project in file ("."))
|
||||||
.settings(buildSettings: _*)
|
.commonSettings()
|
||||||
.settings(Eclipse.settings: _*)
|
.settings(Eclipse.settings: _*)
|
||||||
.settings(Publish.settings: _*)
|
.settings(Publish.settings: _*)
|
||||||
.settings(Release.settings: _*)
|
.settings(Release.settings: _*)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
|
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
|
||||||
|
|
||||||
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1")
|
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0")
|
||||||
|
|
||||||
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
|
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
|
||||||
|
|
||||||
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "0.3.0")
|
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
|
||||||
|
|
||||||
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.0")
|
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.3")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user