aboutsummaryrefslogblamecommitdiff
path: root/project/Build.scala
blob: effe8ac7d46b4d20f99af82e95d33426d79322e3 (plain) (tree)
1
2
3
4
5
6
7
8
9



                              
                           



                                       
                             

                                                      


                                                                             
 









                              






                                                       







                                                                        
                                                 

                        





                                                                                     


                      
  

 
import sbt._
import sbt.Keys._
import play.twirl.sbt.SbtTwirl
import play.twirl.sbt.Import._
import sbt.ScriptedPlugin._

object ApplicationBuild extends Build {

  val common = Seq(
    scalaVersion := "2.10.5",
    scalacOptions ++= Seq("-feature", "-deprecation"),
    organization := "com.github.jodersky",
    version := "0.5.2",
    licenses := Seq(("LGPL", url("http://opensource.org/licenses/LGPL-3.0")))
  )

  lazy val root = (
    Project("root", file("."))
    aggregate(
      library,
      plugin
    )
    settings(
      publish := (),
      publishLocal := ()
    )
  )

  lazy val library = (
    Project("mavlink-library", file("mavlink-library"))
    enablePlugins(SbtTwirl)
    settings(common: _*)
    settings(
      TwirlKeys.templateImports += "com.github.jodersky.mavlink._",
      TwirlKeys.templateImports += "com.github.jodersky.mavlink.trees._"
    )
  )

  lazy val plugin = (
    Project("mavlink-plugin", file("mavlink-plugin"))
    settings(common: _*)
    settings(ScriptedPlugin.scriptedSettings: _*)
    settings(
      sbtPlugin := true,
      name := "sbt-mavlink",
      scriptedLaunchOpts := { scriptedLaunchOpts.value ++
        Seq("-Xmx1024M", "-XX:MaxPermSize=256M", "-Dplugin.version=" + version.value)
      },
      scriptedBufferLog := false,
      publishLocal <<= publishLocal.dependsOn(publishLocal in library)
    )
    dependsOn(library)
  )
  
}