-
Notifications
You must be signed in to change notification settings - Fork 43
/
Build.scala
executable file
·85 lines (79 loc) · 2.69 KB
/
Build.scala
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
import sbt._
import sbt.Keys._
object Build extends sbt.Build {
def releaseResolver(v: String): Resolver = {
val profile = System.getProperty("profile", "default")
profile match {
case "default" => {
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
"snapshots" at nexus + "content/repositories/snapshots"
else
"releases" at nexus + "service/local/staging/deploy/maven2"
}
case p => {
sys.error("unknown profile:%s".format(p))
}
}
}
private val SCALA_VERSION = "2.10.0"
lazy val root = Project(
id = "larray",
base = file("."),
settings = Defaults.defaultSettings ++
Seq(
organization := "org.xerial",
organizationName := "xerial.org",
organizationHomepage := Some(new URL("http://xerial.org")),
description := "Large array library for Java/Scala",
publishMavenStyle := true,
publishArtifact in Test := false,
publishTo <<= version {
(v) => Some(releaseResolver(v))
},
pomIncludeRepository := {
_ => false
},
parallelExecution := true,
parallelExecution in Test := false,
scalacOptions ++= Seq("-encoding", "UTF-8", "-unchecked", "-deprecation", "-feature"),
// custom settings here
scalaVersion := SCALA_VERSION,
crossPaths := false,
libraryDependencies ++= Seq(
// Add dependent jars here
"org.xerial" % "xerial-core" % "3.1",
"junit" % "junit" % "4.10" % "test",
"com.novocode" % "junit-interface" % "0.10-M2" % "test",
"org.scalatest" %% "scalatest" % "2.0.M5b" % "test",
"org.scala-lang" % "scala-reflect" % SCALA_VERSION
),
pomExtra := {
<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/xerial/larray.git</connection>
<developerConnection>scm:git:git@github.com:xerial/larray.git</developerConnection>
<url>github.com/xerial/larray.git</url>
</scm>
<properties>
<scala.version>
{SCALA_VERSION}
</scala.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<developers>
<developer>
<id>leo</id>
<name>Taro L. Saito</name>
<url>http://xerial.org/leo</url>
</developer>
</developers>
}
)
)
}