Permalink
Browse files

aggregated build.sbt into build.scala

  • Loading branch information...
eed3si9n committed Oct 2, 2011
1 parent 325fe27 commit b0d95e0f1ca13a0f68a60f4ecd4849a6cb69c918
Showing with 75 additions and 73 deletions.
  1. +0 −18 cli/build.sbt
  2. +0 −13 integration/build.sbt
  3. +75 −18 project/build.scala
  4. +0 −11 sbt-scalaxb/build.sbt
  5. +0 −13 web/build.sbt
View
@@ -1,18 +0,0 @@
-libraryDependencies ++= Seq(
- "com.github.scopt" %% "scopt" % "1.1.2",
- "org.scala-tools.sbt" % "launcher-interface" % "0.7.4" % "provided" from (
- "http://databinder.net/repo/org.scala-tools.sbt/launcher-interface/0.7.4/jars/launcher-interface.jar"),
- "com.weiglewilczek.slf4s" %% "slf4s" % "1.0.7",
- "ch.qos.logback" % "logback-classic" % "0.9.29")
-
-unmanagedSourceDirectories in Compile <+= baseDirectory( _ / "src_generated" )
-
-sourceGenerators in Compile <+= (sourceManaged in Compile, version) map { (dir, version) =>
- val file = dir / "version.scala"
- IO.write(file, """package scalaxb
-trait Version { val version = "%s" }
-""".format(version))
- Seq(file)
-}
-
-// seq(sbtassembly.Plugin.assemblySettings: _*)
View
@@ -1,13 +0,0 @@
-scalacOptions += "-no-specialization"
-
-libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ )
-
-libraryDependencies ++= Seq(
- "net.databinder" %% "dispatch-http" % "0.8.5" % "test"
-)
-
-parallelExecution in Test := false
-
-publish := {}
-
-publishLocal := {}
View
@@ -2,26 +2,14 @@ import sbt._
object Builds extends Build {
import Keys._
- // import sbtappengine.AppenginePlugin
-
- lazy val root = Project("root", file(".")) aggregate(cli) settings(
- name := "scalaxb"
- )
- lazy val cli = Project("scalaxb", file("cli"))
- lazy val integration = Project("integration", file("integration")) dependsOn(cli % "test")
- lazy val scalaxbPlugin = Project("sbt-scalaxb", file("sbt-scalaxb")) dependsOn(cli)
- // lazy val appengine = Project("web", file("web"),
- // settings = Defaults.defaultSettings ++ AppenginePlugin.webSettings) dependsOn(cli)
-
- override lazy val settings = super.settings ++ Seq(
+ import ScriptedPlugin._
+ import sbtappengine.Plugin._
+
+ lazy val buildSettings = Defaults.defaultSettings ++ Seq(
version := "0.6.5-SNAPSHOT",
organization := "org.scalaxb",
scalaVersion := "2.9.1",
- crossScalaVersions := Seq("2.9.1", "2.9.0-1", "2.8.1"),
- libraryDependencies <+= scalaVersion(sv =>
- if (sv == "2.8.1") "org.specs2" %% "specs2" % "1.4" % "test"
- else "org.specs2" % "specs2_2.9.0-1" % "1.4" % "test"
- ),
+ crossScalaVersions := Seq("2.9.1", "2.8.1"),
publishArtifact in (Compile, packageBin) := true,
publishArtifact in (Test, packageBin) := false,
publishArtifact in (Compile, packageDoc) := false,
@@ -33,6 +21,75 @@ object Builds extends Build {
else Some("Scala Tools Nexus" at nexus + "releases/")
},
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
- publishMavenStyle := true
+ publishMavenStyle := true,
+ parallelExecution in Test := false
+ )
+
+ lazy val cliSettings = buildSettings ++ Seq(
+ name := "scalaxb",
+ libraryDependencies ++= Seq(
+ "com.github.scopt" %% "scopt" % "1.1.2",
+ "org.scala-tools.sbt" % "launcher-interface" % "0.7.4" % "provided" from (
+ "http://databinder.net/repo/org.scala-tools.sbt/launcher-interface/0.7.4/jars/launcher-interface.jar"),
+ "com.weiglewilczek.slf4s" %% "slf4s" % "1.0.7",
+ "ch.qos.logback" % "logback-classic" % "0.9.29"),
+ unmanagedSourceDirectories in Compile <+= baseDirectory( _ / "src_generated" ),
+ sourceGenerators in Compile <+= (sourceManaged in Compile, version) map { (dir, version) =>
+ val file = dir / "version.scala"
+ IO.write(file, """package scalaxb
+trait Version { val version = "%s" }
+""".format(version))
+ Seq(file)
+ }
+ )
+
+ lazy val itSettings = buildSettings ++ Seq(
+ libraryDependencies <++= scalaVersion { sv =>
+ testDeps(sv) ++
+ Seq(
+ "net.databinder" %% "dispatch-http" % "0.8.5" % "test",
+ "org.scala-lang" % "scala-compiler" % sv
+ )
+ }
+ ) ++ noPublish
+
+ lazy val pluginSettings = buildSettings ++ Seq(
+ sbtPlugin := true,
+ crossScalaVersions := Seq("2.9.1"),
+ publishMavenStyle := true) ++
+ ScriptedPlugin.scriptedSettings ++ Seq(
+ scriptedBufferLog := false
+ )
+
+ lazy val webSettings = buildSettings ++
+ appengineSettings ++ Seq(
+ scalaVersion := "2.9.0-1",
+ crossScalaVersions := Seq("2.9.0-1", "2.8.1"),
+ libraryDependencies ++= Seq(
+ "net.databinder" %% "unfiltered-filter" % "0.4.0",
+ "net.databinder" %% "unfiltered-uploads" % "0.4.0",
+ "javax.servlet" % "servlet-api" % "2.3" % "provided"
+ )
+ ) ++ noPublish
+
+ lazy val noPublish: Seq[Project.Setting[_]] = Seq(
+ publish := {},
+ publishLocal := {}
)
+
+ def testDeps(sv: String) =
+ if (sv == "2.8.1") Seq("org.specs2" %% "specs2" % "1.4" % "test")
+ else Seq("org.specs2" %% "specs2" % "1.6.1" % "test",
+ "org.specs2" %% "specs2-scalaz-core" % "6.0.1" % "test")
+
+ lazy val root = Project("root", file("."),
+ settings = buildSettings ++ Seq(name := "scalaxb")) aggregate(cli)
+ lazy val cli = Project("scalaxb", file("cli"),
+ settings = cliSettings)
+ lazy val integration = Project("integration", file("integration"),
+ settings = itSettings) dependsOn(cli % "test")
+ lazy val scalaxbPlugin = Project("sbt-scalaxb", file("sbt-scalaxb"),
+ settings = pluginSettings) dependsOn(cli)
+ lazy val appengine = Project("web", file("web"),
+ settings = webSettings) dependsOn(cli)
}
View
@@ -1,11 +0,0 @@
-sbtPlugin := true
-
-scalaVersion := "2.9.1"
-
-crossScalaVersions := Seq("2.9.1")
-
-publishMavenStyle := true
-
-seq(ScriptedPlugin.scriptedSettings: _*)
-
-scriptedBufferLog := false
View
@@ -1,13 +0,0 @@
-libraryDependencies ++= Seq(
- "net.databinder" %% "unfiltered-filter" % "0.4.0",
- "net.databinder" %% "unfiltered-uploads" % "0.4.0",
- "javax.servlet" % "servlet-api" % "2.3" % "provided"
-)
-
-crossScalaVersions := Seq("2.9.0-1", "2.8.1")
-
-scalaVersion := "2.9.0-1"
-
-publish := {}
-
-publishLocal := {}

0 comments on commit b0d95e0

Please sign in to comment.