forked from isopov/msgpack-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuild.scala
More file actions
122 lines (101 loc) · 3.71 KB
/
Copy pathBuild.scala
File metadata and controls
122 lines (101 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
* Copyright 2012 Taro L. Saito
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import de.johoop.findbugs4sbt.ReportType
import sbt._
import Keys._
import xerial.sbt.Sonatype._
import de.johoop.findbugs4sbt.FindBugs._
import de.johoop.jacoco4sbt._
import JacocoPlugin._
import sbtrelease.ReleasePlugin._
object Build extends Build {
val SCALA_VERSION = "2.11.1"
lazy val buildSettings = Defaults.defaultSettings ++
releaseSettings ++
findbugsSettings ++
jacoco.settings ++
sonatypeSettings ++
Seq[Setting[_]](
organization := "org.msgpack",
organizationName := "MessagePack",
organizationHomepage := Some(new URL("http://msgpack.org/")),
description := "MessagePack for Java",
scalaVersion in Global := SCALA_VERSION,
logBuffered in Test := false,
//parallelExecution in Test := false,
autoScalaLibrary := false,
crossPaths := false,
concurrentRestrictions in Global := Seq(
Tags.limit(Tags.Test, 1)
),
parallelExecution in jacoco.Config := false,
// Since sbt-0.13.2
incOptions := incOptions.value.withNameHashing(true),
//resolvers += Resolver.mavenLocal,
scalacOptions ++= Seq("-encoding", "UTF-8", "-deprecation", "-unchecked", "-target:jvm-1.6", "-feature"),
javacOptions in (Compile, compile) ++= Seq("-encoding", "UTF-8", "-Xlint:unchecked", "-Xlint:deprecation", "-source", "1.6", "-target", "1.6"),
pomExtra := {
<url>http://msgpack.org/</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<connection>scm:git:github.com/msgpack/msgpack-java.git</connection>
<developerConnection>scm:git:git@github.com:msgpack/msgpack-java.git</developerConnection>
<url>github.com/msgpack/msgpack-java.git</url>
</scm>
<properties>
<scala.version>{SCALA_VERSION}</scala.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
},
findbugsReportType := Some(ReportType.FancyHtml),
findbugsReportPath := Some(crossTarget.value / "findbugs" / "report.html")
)
import Dependencies._
lazy val root = Project(
id = "msgpack-java",
base = file("."),
settings = buildSettings ++ sonatypeSettings ++ Seq(
findbugs := {
// do not run findbugs for the root project
},
// Do not publish the root project
publish := {},
publishLocal := {}
)
) aggregate(msgpackCore)
lazy val msgpackCore = Project(
id = "msgpack-core",
base = file("msgpack-core"),
settings = buildSettings ++ Seq(
description := "Core library of the MessagePack for Java",
libraryDependencies ++= testLib
)
)
object Dependencies {
val testLib = Seq(
"org.scalatest" % "scalatest_2.11" % "2.2.0" % "test",
"org.scalacheck" % "scalacheck_2.11" % "1.11.4" % "test",
"org.xerial" % "xerial-core" % "3.3.0" % "test",
"org.msgpack" % "msgpack" % "0.6.9" % "test",
"com.novocode" % "junit-interface" % "0.10" % "test"
)
}
}