Modernize and adapt build, update to newest versions

This commit is contained in:
Johannes Rudolph 2017-10-23 16:19:47 +02:00
parent 8d5e9d9015
commit 0bbeea3977
4 changed files with 31 additions and 42 deletions

View File

@ -9,7 +9,8 @@ libraryDependencies ++= {
Nil
}
libraryDependencies += "org.specs2" %% "specs2-core" % "3.9.1" % "test"
libraryDependencies += "org.specs2" %% "specs2-core" % "3.9.5" % Test
libraryDependencies += Defaults.sbtPluginExtra(
"com.dwijnand" % "sbt-compat" % "1.1.0",
@ -17,22 +18,13 @@ libraryDependencies += Defaults.sbtPluginExtra(
(scalaBinaryVersion in update).value
)
scalacOptions ++= Seq("-deprecation", "-unchecked")
crossSbtVersions := Seq("1.0.2", "0.13.16")
ScalariformSupport.formatSettings
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-unchecked"
)
crossSbtVersions := Seq("1.0.1", "0.13.16")
//sbtVersion in pluginCrossBuild := "1.0.0"
/*
Try to prevent silly warnings
libraryDependencies += ("org.scala-sbt" %% "main-settings" % "1.0.1-SNAPSHOT")//.excludeAll(ExclusionRule(organization = "org.scala-sbt"))
libraryDependencies += "org.scala-sbt" %% "command" % "1.0.0"force()
libraryDependencies += "org.scala-sbt" %% "completion" % "1.0.0"force()
libraryDependencies += "org.scala-sbt" %% "task-system" % "1.0.0"force()
libraryDependencies += "org.scala-sbt" %% "core-macros" % "1.0.0" force()
*/
ScalariformSupport.formatSettings

View File

@ -1,16 +0,0 @@
import java.net.URL
object Helpers {
def generatePomExtra(scmUrl: String, scmConnection: String,
developerId: String, developerName: String): xml.NodeSeq =
<scm>
<url>{ scmUrl }</url>
<connection>{ scmConnection }</connection>
</scm>
<developers>
<developer>
<id>{ developerId }</id>
<name>{ developerName }</name>
</developer>
</developers>
}

View File

@ -1 +1 @@
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0-M1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")

View File

@ -1,7 +1,9 @@
publishTo <<= version { v: String =>
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
Some {
if (version.value.trim.endsWith("SNAPSHOT")) "snapshots" at nexus + "content/repositories/snapshots"
else "releases" at nexus + "service/local/staging/deploy/maven2"
}
}
publishMavenStyle := true
@ -10,9 +12,20 @@ publishArtifact in Test := false
pomIncludeRepository := { _ => false }
pomExtra :=
Helpers.generatePomExtra("git@github.com:jrudolph/sbt-dependency-graph.git",
"scm:git:git@github.com:jrudolph/sbt-dependency-graph.git",
"jrudolph", "Johannes Rudolph")
scmInfo := Some(
ScmInfo(
browseUrl = url("https://github.com/jrudolph/sbt-dependency-graph"),
connection = "scm:git:git@github.com:jrudolph/sbt-dependency-graph.git"
)
)
developers := List(
Developer(
"jrudolph",
"Johannes Rudolph",
"johannes.rudolph@gmail.com",
url("https://virtual-void.net")
)
)
useGpg := true