-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
69 lines (50 loc) · 2.33 KB
/
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
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
// this is the root build.sbt
// these settings apply to all subprojects
organization in ThisBuild := productPackage.mkString(".")
version in ThisBuild := productVersion
javacOptions in ThisBuild ++= Seq("-source", "1.8", "-target", "1.8")
javacOptions in (ThisBuild, doc) := Seq("-source", "1.8")
scalacOptions in ThisBuild ++= Seq("-encoding", "UTF-8", "-Xlint", "-deprecation", "-unchecked", "-feature", "-target:jvm-1.8")
publishTo in ThisBuild := Some(Resolver.file("file", new File( publishPrefix )) )
crossPaths in ThisBuild := false
homepage in ThisBuild := Some(url("https://scalismo.org"))
licenses in ThisBuild += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))
scmInfo in ThisBuild := Some(ScmInfo(url("https://github.com/unibas-gravis/scalismo-native"), "[email protected]:unibas-gravis/scalismo-native.git"))
developers in ThisBuild := List(Developer("marcelluethi", "marcelluethi", "[email protected]", url("https://github.com/marcelluethi")))
publishMavenStyle := true
/*
Eventually we want to publish to sonatype. However, as the files in the
build need fixup locally, we cannot directly publish. Rather we publish in
a tmp directory and copy the resulting release files manually onto sonatype.
This is justified as we don't release often.
*/
// This is what we would like to do
//publishTo in ThisBuild := Some(
// if (isSnapshot.value)
// Opts.resolver.sonatypeSnapshots
// else
// Opts.resolver.sonatypeStaging
// )
// This is what we do instead
publishTo := Some(MavenCache("local-maven", new File( publishPrefix )))
// the root project itself does not publish anything, but depends on the publish[-local] tasks.
// Well, except that for the implementation, it also needs to be "fixed up".
// So first, set the task to do nothing, then add the dependency. The other dependencies are found transitively.
publishLocal := {}
publishLocal <<= publishLocal dependsOn (
publishLocalFixup in impl_all,
publishLocalFixup in impl_linux64,
publishLocalFixup in impl_mac64,
publishLocalFixup in impl_win64,
publishLocalFixup in impl_win32,
publishLocalFixup in impl_win
)
publish := {}
publish <<= publish dependsOn (
publishFixup in impl_all,
publishFixup in impl_linux64,
publishFixup in impl_mac64,
publishFixup in impl_win64,
publishFixup in impl_win32,
publishFixup in impl_win
)