Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

Updated build conditions #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import scala.xml.Group

val manifestSetting = packageOptions += {
Package.ManifestAttributes(
"Created-By" -> "Simple Build Tool",
"Built-By" -> System.getProperty("user.name"),
"Build-Jdk" -> System.getProperty("java.version"),
"Specification-Title" -> name.value,
"Specification-Version" -> version.value,
"Specification-Vendor" -> organization.value,
"Implementation-Title" -> name.value,
"Implementation-Version" -> version.value,
"Implementation-Vendor-Id" -> organization.value,
"Implementation-Vendor" -> organization.value
)
}

val publishSettings: Seq[Setting[_]] = Seq(
publishTo := {
val res =
if (version.value.trim.endsWith("SNAPSHOT"))
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
Some(res)
},
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { x => false }
)

val mavenCentralFrouFrou = Seq(
homepage := Some(new URL("http://swagger.io")),
startYear := Some(2009),
licenses := Seq(("ASL", new URL("http://github.com/swagger-api/swagger-async-httpclient/raw/HEAD/LICENSE"))),
pomExtra := pomExtra.value ++ Group(
<scm>
<url>http://github.com/swagger-api/swagger-async-httpclient</url>
<connection>scm:git:git://github.com/swagger-api/swagger-async-httpclient.git</connection>
</scm>
<developers>
<developer>
<id>casualjim</id>
<name>Ivan Porto Carrero</name>
<url>http://flanders.co.nz/</url>
</developer>
</developers>
)
)

val projectSettings = Seq(
organization := "io.swagger",
name := "swagger-async-httpclient",
scalaVersion := "2.11.12",
scalacOptions ++= Seq("-unchecked", "-deprecation", "-optimize", "-Xcheckinit", "-encoding", "utf8"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
manifestSetting,
autoCompilerPlugins := true,
parallelExecution in Test := false,
commands += Command.args("s", "<shell command>") { (state, args) =>
args.mkString(" ") ! state.log
state
},
TaskKey[Unit]("gc", "runs garbage collector") := {
streams.value.log.info("requesting garbage collection")
System.gc()
}
)

val buildInfoConfig: Seq[Setting[_]] = Seq(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := organization(_ + ".client.async").value
)

val defaultSettings =
Defaults.coreDefaultSettings ++ buildInfoConfig ++ projectSettings ++ publishSettings ++ mavenCentralFrouFrou


lazy val root = Project(
id = "swagger-async-httpclient",
base = file("."),
settings = defaultSettings ++ Seq(
libraryDependencies ++= Seq(
"org.scalatra.rl" %% "rl" % "0.4.10",
"org.slf4j" % "slf4j-api" % "1.7.25",
"ch.qos.logback" % "logback-classic" % "1.2.3" % "provided",
"org.json4s" %% "json4s-jackson" % "3.5.3",
"com.googlecode.juniversalchardet" % "juniversalchardet" % "1.0.3",
"eu.medsea.mimeutil" % "mime-util" % "2.1.3" exclude("org.slf4j", "slf4j-log4j12") exclude("log4j", "log4j"),
"com.ning" % "async-http-client" % "1.8.17",
"com.typesafe.scala-logging" %% "scala-logging" % "3.7.2"
)
)
)

enablePlugins(BuildInfoPlugin)
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.5
sbt.version=1.1.0
136 changes: 0 additions & 136 deletions project/build.scala

This file was deleted.

8 changes: 3 additions & 5 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.8.5")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.3.2")

addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.6")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.7")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.7.0")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.3.4")
Loading