-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
86 lines (80 loc) · 2.59 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
inThisBuild(Def.settings(
crossScalaVersions := Seq("2.12.13", "2.11.12", "2.13.5"),
scalaVersion := crossScalaVersions.value.head,
version := "1.0.1-SNAPSHOT",
organization := "org.scala-js",
scalacOptions ++= Seq(
"-encoding", "utf-8",
"-deprecation",
"-feature",
"-Xfatal-warnings",
),
// Licensing
homepage := Some(url("https://github.com/scala-js/scala-js-fake-weakreferences")),
startYear := Some(2013),
licenses += (("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0"))),
scmInfo := Some(ScmInfo(
url("https://github.com/scala-js/scala-js-fake-weakreferences"),
"scm:git:git@github.com:scala-js/scala-js-fake-weakreferences.git",
Some("scm:git:git@github.com:scala-js/scala-js-fake-weakreferences.git"))),
// Publishing
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.endsWith("-SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pomExtra := (
<developers>
<developer>
<id>sjrd</id>
<name>Sébastien Doeraene</name>
<url>https://github.com/sjrd/</url>
</developer>
<developer>
<id>gzm0</id>
<name>Tobias Schlatter</name>
<url>https://github.com/gzm0/</url>
</developer>
</developers>
),
pomIncludeRepository := { _ => false },
))
val commonSettings = Def.settings(
// sbt-header configuration
headerLicense := Some(HeaderLicense.Custom(
s"""scalajs-fake-weakreferences (${homepage.value.get})
|
|Copyright EPFL.
|
|Licensed under Apache License 2.0
|(https://www.apache.org/licenses/LICENSE-2.0).
|
|See the NOTICE file distributed with this work for
|additional information regarding copyright ownership.
|""".stripMargin
)),
)
lazy val root: Project = project.in(file("."))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings: _*)
.settings(
name := "scalajs-fake-weakreferences",
Compile / packageBin / mappings ~= {
_.filter(!_._2.endsWith(".class"))
},
exportJars := true,
)
lazy val testSuite = crossProject(JSPlatform, JVMPlatform)
.in(file("test-suite"))
.jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin))
.settings(commonSettings: _*)
.settings(
testOptions += Tests.Argument(TestFramework("com.novocode.junit.JUnitFramework"), "-v", "-a"),
)
.jsConfigure(_.dependsOn(root))
.jvmSettings(
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test",
)