From c569a4c58cf29778df28392b48e20ffebdbc518e Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 19 May 2013 01:14:42 +0200 Subject: o Initial import of the Scala version of the Collection+JSON explorer. --- project/Build.scala | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 project/Build.scala (limited to 'project/Build.scala') diff --git a/project/Build.scala b/project/Build.scala new file mode 100644 index 0000000..1542f8f --- /dev/null +++ b/project/Build.scala @@ -0,0 +1,84 @@ +import sbt._ +import sbt.Keys._ +import xml.Group +import aether._ + +object Build extends sbt.Build { + + lazy val buildSettings = Defaults.defaultSettings ++ Aether.aetherPublishSettings ++ Seq( + organization := "io.trygvis", + scalaVersion := "2.10.0", +// crossScalaVersions := Seq("2.9.1", "2.9.2", "2.10.0"), + scalacOptions := Seq("-deprecation"), + publishTo <<= (version) apply { + (v: String) => if (v.trim().endsWith("SNAPSHOT")) Some(Resolvers.sonatypeNexusSnapshots) else Some(Resolvers.sonatypeNexusStaging) + }, + pomIncludeRepository := { x => false }, + credentials += Credentials(Path.userHome / ".sbt" / ".credentials") + ) + + lazy val root = Project( + id = "collection-json-explorer", + base = file("."), + settings = buildSettings ++ Seq( + description := "Collection+JSON Explorer", + name := "collection-json-explorer", + libraryDependencies += "net.hamnaberg.rest" %% "scala-json-collection" % "2.1-SNAPSHOT", + libraryDependencies += "net.databinder" %% "unfiltered-filter" % "0.6.8", + libraryDependencies += "net.databinder" %% "unfiltered-directives" % "0.6.8", + libraryDependencies += "net.databinder" %% "unfiltered-jetty" % "0.6.8", + libraryDependencies += "net.databinder" %% "unfiltered-netty" % "0.6.8", + libraryDependencies <+= scalaVersion { sv => + val ver = if (sv.startsWith("2.10")) "1.13" else "1.12.3" + "org.specs2" %% "specs2" % ver % "test" + }/*, + manifestSetting*/ + ) ++ mavenCentralFrouFrou + ) + + object Resolvers { + val sonatypeNexusSnapshots = "Sonatype Nexus Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" + val sonatypeNexusStaging = "Sonatype Nexus Staging" at "https://oss.sonatype.org/service/local/staging/deploy/maven2" + } + + /* + lazy val manifestSetting = packageOptions <+= (name, version, organization) map { + (title, version, vendor) => + Package.ManifestAttributes( + "Created-By" -> "Simple Build Tool", + "Built-By" -> System.getProperty("user.name"), + "Build-Jdk" -> System.getProperty("java.version"), + "Specification-Title" -> title, + "Specification-Version" -> version, + "Specification-Vendor" -> vendor, + "Implementation-Title" -> title, + "Implementation-Version" -> version, + "Implementation-Vendor-Id" -> vendor, + "Implementation-Vendor" -> vendor + ) + } + */ + + // Things we care about primarily because Maven Central demands them + lazy val mavenCentralFrouFrou = Seq( +// homepage := Some(new URL("http://github.com/hamnis/scala-collection-json/")), + startYear := Some(2013), + licenses := Seq(("Apache 2", new URL("http://www.apache.org/licenses/LICENSE-2.0.txt")))/*, + pomExtra <<= (pomExtra, name, description) {(pom, name, desc) => pom ++ Group( + + http://github.com/hamnis/scala-collection-json + scm:git:git://github.com/hamnis/scala-collection-json.git + scm:git:git@github.com:hamnis/scala-collection-json.git + + + + hamnis + Erlend Hamnaberg + http://twitter.com/hamnis + + + )} + */ + ) + } + -- cgit v1.2.3