bill-acceptor
rs-232 serial bill acceptor in scala and akka
git clone https://9o.is/git/bill-acceptor.git
BuildSettings.scala
(1461B)
1 import sbt._
2 import sbt.Keys._
3
4 import sbtbuildinfo.Plugin._
5 import com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys
6
7 object BuildSettings {
8 val buildTime = SettingKey[String]("build-time")
9
10 val defaultScalaVersion = "2.10.4"
11
12 val basicSettings = Defaults.defaultSettings ++ Seq(
13 name := "bill-acceptor",
14 version := "0.1-SNAPSHOT",
15 organization := "inc.pyc",
16 scalaVersion := defaultScalaVersion,
17 scalacOptions <<= scalaVersion map { sv: String =>
18 if (sv.startsWith("2.10."))
19 Seq("-deprecation", "-unchecked", "-feature", "-language:postfixOps", "-language:implicitConversions")
20 else
21 Seq("-deprecation", "-unchecked")
22 },
23 resolvers ++= Seq[Resolver](
24 "Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases"
25 )
26 )
27
28 val appSettings =
29 basicSettings ++
30 buildInfoSettings ++
31 seq(
32 buildTime := System.currentTimeMillis.toString,
33
34 // build-info
35 buildInfoKeys ++= Seq[BuildInfoKey](buildTime),
36 buildInfoPackage := "inc.pyc",
37 sourceGenerators in Compile <+= buildInfo,
38
39 publishArtifact in Test := false,
40
41 publish <<= publish dependsOn (test in Test),
42
43 // eclipse
44 EclipseKeys.withSource := true,
45
46 publishMavenStyle := true
47 )
48
49
50 def module(name: String, settings: Seq[Def.Setting[_]] = Seq.empty) =
51 Project(name, file(name.replace("-", "")), settings = appSettings)
52
53 }
54