-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
117 lines (102 loc) · 3.19 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
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
115
116
organization in ThisBuild := "de.surfice"
version in ThisBuild := "0.0.2-SNAPSHOT"
scalaVersion in ThisBuild := "2.11.12"
val Version = new {
val slogging = "0.5.3"
val objc = "0.0.5-SNAPSHOT"
val utest = "0.6.3"
}
lazy val commonSettings = Seq(
scalacOptions ++= Seq("-deprecation","-unchecked","-feature","-language:implicitConversions","-Xlint"),
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full),
libraryDependencies ++= Seq(
"de.surfice" %%% "scalanative-interop-objc" % Version.objc,
"com.lihaoyi" %%% "utest" % Version.utest % "test"
),
testFrameworks += new TestFramework("utest.runner.Framework")
)
lazy val nativeSettings = Seq(
nativeCompileOptions ++= Seq("-g"),
nativeLinkStubs := true
)
lazy val cocoa = project.in(file("."))
.aggregate(foundation,appkit,coredata)
.settings(dontPublish:_*)
.settings(
name := "sncocoa"
)
lazy val foundation = project
.enablePlugins(ScalaNativePlugin)
.settings(commonSettings ++ nativeSettings ++ publishingSettings:_*)
.settings(
name := "scalanative-cocoa-foundation"
)
lazy val appkit = project
.enablePlugins(ScalaNativePlugin)
.dependsOn(foundation)
.settings(commonSettings ++ nativeSettings ++ publishingSettings:_*)
.settings(
name := "scalanative-cocoa-appkit"
)
lazy val uikit = project
.enablePlugins(ScalaNativePlugin)
.dependsOn(foundation)
.settings(commonSettings ++ nativeSettings ++ publishingSettings:_*)
.settings(
name := "scalanative-cocoa-uikit"
)
lazy val coredata = project
.enablePlugins(ScalaNativePlugin)
.dependsOn(foundation)
.settings(commonSettings ++ nativeSettings ++ publishingSettings:_*)
.settings(
name := "scalanative-cocoa-coredata"
)
lazy val test = project
.enablePlugins(ScalaNativePlugin)
.dependsOn(appkit)
.settings(commonSettings ++ nativeSettings ++ dontPublish:_*)
.settings(
nativeLinkingOptions ++= Seq(
"-framework", "Foundation",
"/Volumes/JKDATA/dev/scala-native/cocoa/util.o"
)
)
lazy val dontPublish = Seq(
publish := {},
publishLocal := {},
com.typesafe.sbt.pgp.PgpKeys.publishSigned := {},
com.typesafe.sbt.pgp.PgpKeys.publishLocalSigned := {},
publishArtifact := false,
publishTo := Some(Resolver.file("Unused transient repository",file("target/unusedrepo")))
)
lazy val publishingSettings = Seq(
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pomExtra := (
<url>https://github.com/jokade/scalantive-cocoa</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<scm>
<url>git@github.com:jokade/scalantive-cocoa</url>
<connection>scm:git:git@github.com:jokade/scalantive-cocoa.git</connection>
</scm>
<developers>
<developer>
<id>jokade</id>
<name>Johannes Kastner</name>
<email>jokade@karchedon.de</email>
</developer>
</developers>
)
)