-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
34 lines (32 loc) · 988 Bytes
/
build.sbt
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
/*
* Exclude these files:
* - Test object
* - Non OOP implementation (AerialImage)
*
* Code taken from: http://sandarenu.blogspot.fr/2012/04/exclude-resource-files-from-jar-file.html
*/
val excludeFileRegx = """(Test|AerialImage).*?\.class""".r
// Common settings
lazy val commonSettings = Seq(
organization := "com.tncy.top",
organizationName := "Telecom Nancy - TOP",
version := "1.0.0",
//scalaVersion := "2.9.2"
crossScalaVersions := Seq("2.9.2", "2.10.6", "2.11.7")
)
// Root project
lazy val root = (project in file(".")).
settings(commonSettings: _*).
settings(
name := "imagewrapper",
// Use mappings task to exclude files
mappings in (Compile, packageBin) ~= { (ms: Seq[(File, String)]) =>
ms filter {
case (file, toPath) => {
val shouldExclude = excludeFileRegx.pattern.matcher(file.getName).matches
//println("===========" + file + " " + shouldExclude)
!shouldExclude
}
}
}
)