|
| 1 | +/* |
| 2 | + * Copyright 2012 Taro L. Saito |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | + |
| 18 | +import sbt._ |
| 19 | +import Keys._ |
| 20 | +import xerial.sbt.Sonatype._ |
| 21 | + |
| 22 | +object Build extends Build { |
| 23 | + |
| 24 | + val SCALA_VERSION = "2.10.3" |
| 25 | + |
| 26 | + lazy val buildSettings = Defaults.defaultSettings ++ Seq[Setting[_]]( |
| 27 | + organization := "org.msgpack", |
| 28 | + organizationName := "MessagePack", |
| 29 | + organizationHomepage := Some(new URL("http://msgpack.org/")), |
| 30 | + description := "MessagePack for Java", |
| 31 | + scalaVersion in Global := SCALA_VERSION, |
| 32 | + sbtVersion in Global := "0.13.2-M1", |
| 33 | + logBuffered in Test := false, |
| 34 | + //parallelExecution in Test := false, |
| 35 | + autoScalaLibrary := false, |
| 36 | + crossPaths := false, |
| 37 | + // Since sbt-0.13.2 |
| 38 | + incOptions := incOptions.value.withNameHashing(true), |
| 39 | + scalacOptions ++= Seq("-encoding", "UTF-8", "-deprecation", "-unchecked", "-target:jvm-1.6", "-feature"), |
| 40 | + pomExtra := { |
| 41 | + <url>http://msgpack.org/</url> |
| 42 | + <licenses> |
| 43 | + <license> |
| 44 | + <name>Apache 2</name> |
| 45 | + <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> |
| 46 | + </license> |
| 47 | + </licenses> |
| 48 | + <scm> |
| 49 | + <connection>scm:git:github.com/msgpack/msgpack-java.git</connection> |
| 50 | + <developerConnection>scm:git:git@github.com:msgpack/msgpack-java.git</developerConnection> |
| 51 | + <url>github.com/msgpack/msgpack-java.git</url> |
| 52 | + </scm> |
| 53 | + <properties> |
| 54 | + <scala.version>{SCALA_VERSION}</scala.version> |
| 55 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 56 | + </properties> |
| 57 | + } |
| 58 | + ) |
| 59 | + |
| 60 | + import Dependencies._ |
| 61 | + |
| 62 | + |
| 63 | + lazy val root = Project( |
| 64 | + id = "msgpack-java", |
| 65 | + base = file("."), |
| 66 | + settings = buildSettings ++ sonatypeSettings |
| 67 | + ) aggregate(msgpackCore, msgpackValue) |
| 68 | + |
| 69 | + |
| 70 | + lazy val msgpackCore = Project( |
| 71 | + id = "msgpack-core", |
| 72 | + base = file("msgpack-core"), |
| 73 | + settings = buildSettings ++ Seq( |
| 74 | + description := "Core library of the MessagePack for Java", |
| 75 | + libraryDependencies ++= testLib |
| 76 | + ) |
| 77 | + ) |
| 78 | + |
| 79 | + lazy val msgpackValue = Project( |
| 80 | + id = "msgpack-value", |
| 81 | + base = file("msgpack-value"), |
| 82 | + settings = buildSettings ++ Seq( |
| 83 | + description := "Value reader/writer library of the MessagePack for Java", |
| 84 | + libraryDependencies ++= testLib |
| 85 | + ) |
| 86 | + ) dependsOn(msgpackCore) |
| 87 | + |
| 88 | + |
| 89 | + object Dependencies { |
| 90 | + |
| 91 | + val testLib = Seq( |
| 92 | + "org.scalatest" % "scalatest_2.10" % "2.1.0-RC2" % "test", |
| 93 | + "org.scalacheck" % "scalacheck_2.10" % "1.11.3" % "test" |
| 94 | + ) |
| 95 | + } |
| 96 | + |
| 97 | +} |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
0 commit comments