liftweb-uirouter

angularjs ui-router module for scala liftweb framework

git clone https://9o.is/git/liftweb-uirouter.git

BuildSettings.scala

(2252B)


      1 import sbt._
      2 import sbt.Keys._
      3 
      4 import sbtbuildinfo.Plugin._
      5 import com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys
      6 import ohnosequences.sbt.SbtS3Resolver._
      7 
      8 object BuildSettings {
      9   
     10   object Ver {
     11     val lift = "3.0-M1"
     12     val lift_edition = "3.0"
     13   }
     14 
     15   val liftVersion = SettingKey[String]("liftVersion",
     16     "Full version number of the Lift Web Framework")
     17 
     18   val liftEdition = SettingKey[String]("liftEdition",
     19     "Lift Edition (short version number to append to artifact name)")
     20 
     21   val buildTime = SettingKey[String]("build-time")
     22 
     23   val basicSettings = Defaults.defaultSettings ++ Seq(
     24     name := "uirouter",
     25     version := "0.1-SNAPSHOT",
     26     organization := "net.liftmodules",
     27     liftVersion <<= liftVersion ?? Ver.lift,
     28     liftEdition <<= liftEdition ?? Ver.lift_edition,
     29     moduleName <<= (name, liftEdition) { (n, e) =>  n + "_" + e },
     30     scalaVersion := "2.10.3",
     31     scalacOptions <<= scalaVersion map { sv: String =>
     32       if (sv.startsWith("2.10."))
     33         Seq("-deprecation", "-unchecked", "-feature", "-language:postfixOps", "-language:implicitConversions")
     34       else
     35         Seq("-deprecation", "-unchecked")
     36     },
     37     resolvers += "Sonatype Releases" at "http://oss.sonatype.org/content/repositories/releases"
     38   )
     39 
     40   val appSettings = 
     41     basicSettings ++
     42     S3Resolver.defaults ++
     43     buildInfoSettings ++
     44     seq(
     45       buildTime := System.currentTimeMillis.toString,
     46 
     47       // build-info
     48       buildInfoKeys ++= Seq[BuildInfoKey](buildTime),
     49       buildInfoPackage := "inc.pyc",
     50       sourceGenerators in Compile <+= buildInfo,
     51 
     52       // eclipse
     53       EclipseKeys.withSource := true,
     54 
     55       publishMavenStyle := true,
     56 
     57       publishArtifact in Test := false,
     58 
     59       
     60       pomIncludeRepository := { _ => false },
     61             
     62       publishTo := Some(s3resolver.value(
     63           "My "+{if (isSnapshot.value) "snapshots-pyc-inc" else "releases-pyc-inc"}+" S3 bucket", 
     64           s3(if (isSnapshot.value) "snapshots-pyc-inc" else "releases-pyc-inc"))),
     65       
     66       s3credentials := {
     67         Path.userHome / ".ivy2" / ".s3credentials"
     68       },
     69       
     70       s3region := com.amazonaws.services.s3.model.Region.US_Standard 
     71     )
     72 
     73   lazy val noPublishing = seq(
     74     publish := (),
     75     publishLocal := ()
     76   )
     77 }
     78