-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
84 lines (76 loc) · 2.87 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
val githubRepo = "scalajs-ol3"
val openlayersVersion = "3.11.1"
val commonSettings = Seq(
organization := "com.github.maprohu",
version := "0.1.0-SNAPSHOT",
resolvers += Resolver.sonatypeRepo("snapshots"),
scalaVersion := "2.11.7",
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")
},
pomIncludeRepository := { _ => false },
licenses := Seq("BSD-style" -> url("http://www.opensource.org/licenses/bsd-license.php")),
homepage := Some(url(s"https://github.com/maprohu/${githubRepo}")),
pomExtra := (
<scm>
<url>git@github.com:maprohu/{githubRepo}.git</url>
<connection>scm:git:git@github.com:maprohu/{githubRepo}.git</connection>
</scm>
<developers>
<developer>
<id>maprohu</id>
<name>maprohu</name>
<url>https://github.com/maprohu</url>
</developer>
</developers>
)
)
val noPublish = Seq(
publishArtifact := false,
publishTo := Some(Resolver.file("Unused transient repository", file("target/unusedrepo")))
)
lazy val facade = project
.settings(commonSettings)
.enablePlugins(JsdocPlugin, ScalaJSPlugin)
.settings(
publishArtifact in (Compile, packageDoc) := false,
name := "scalajs-ol3",
jsdocRunSource := Some(
uri(s"https://github.com/openlayers/ol3.git#v${openlayersVersion}")
),
jsdocRunInputs := Seq("src", "externs", "../../../../src/main/jsdoc/extra"),
jsdocRunTarget := (sourceDirectory in Compile).value / "jsdoc" / s"ol3-${openlayersVersion}-jsdoc.json",
jsdocDocletsFile := jsdocRunTarget.value,
jsdocSourceFileRoot := new File("D:\\\\git\\\\scalajs-ol3\\\\facade\\\\target\\\\jsdocgenwork\\\\d71ffeca6dc3732b93a5\\\\ol3").toURI,
jsdocSourcePublishRoot := uri(s"https://github.com/openlayers/ol3/blob/v${openlayersVersion}/"),
jsdocGlobalScope := Seq("ol3"),
jsdocUtilScope := "pkg",
sourceGenerators in Compile += jsdocGenerate.taskValue,
jsDependencies ++= Seq(
"org.webjars" % "openlayers" % openlayersVersion / s"webjars/openlayers/${openlayersVersion}/ol-debug.js" minified s"webjars/openlayers/${openlayersVersion}/ol.js"
),
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.8.0"
),
mappings in (Compile, packageSrc) ++=
(managedSources in Compile).value pair relativeTo((sourceManaged in Compile).value)
)
lazy val testapp = project
.settings(commonSettings)
.settings(noPublish)
.enablePlugins(ScalaJSPlugin)
.dependsOn(facade)
.settings(
persistLauncher in Compile := true,
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.8.0"
)
)
lazy val root = (project in file("."))
.settings(noPublish)
.aggregate(facade, testapp)