forked from scala-js/scala-js-java-logging
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
84 lines (81 loc) · 2.8 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
import sbtcrossproject.crossProject
ThisBuild / crossScalaVersions := Seq("2.12.19", "2.13.14", "3.3.3")
ThisBuild / scalaVersion := (ThisBuild / crossScalaVersions).value.last
val commonSettings: Seq[Setting[_]] = Seq(
version := "1.0.1-SNAPSHOT",
organization := "org.scala-native",
scalacOptions ++= Seq("-deprecation", "-feature", "-release:8"),
homepage := Some(url("http://scala-native.org/")),
licenses += ("BSD New",
url("https://github.com/scala-native/scala-native-java-logging/blob/main/LICENSE")),
scmInfo := Some(ScmInfo(
url("https://github.com/scala-native/scala-native-java-logging"),
"scm:git:[email protected]:scala-native/scala-native-java-logging.git",
Some("scm:git:[email protected]:scala-native/scala-native-java-logging.git")))
)
lazy val root: Project = project
.in(file("."))
.enablePlugins(ScalaNativePlugin)
.settings(commonSettings)
.settings(
name := "scala-native-java-logging",
Compile / packageBin / mappings ~= {
_.filterNot { case (_, path) =>
Seq(".class", ".tasty").exists(path.endsWith)
}
},
exportJars := true,
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")
},
credentials ++= {
for {
user <- sys.env.get("MAVEN_USER")
password <- sys.env.get("MAVEN_PASSWORD")
} yield Credentials(
realm = "Sonatype Nexus Repository Manager",
host = "oss.sonatype.org",
userName = user,
passwd = password
)
}.toSeq,
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>
<developer>
<id>nicolasstucki</id>
<name>Nicolas Stucki</name>
<url>https://github.com/nicolasstucki/</url>
</developer>
</developers>
),
pomIncludeRepository := { _ => false }
)
lazy val testSuite = crossProject(NativePlatform, JVMPlatform)
.nativeConfigure(_.enablePlugins(ScalaNativeJUnitPlugin))
.settings(commonSettings: _*)
.settings(
testOptions += Tests.Argument(TestFramework("com.novocode.junit.JUnitFramework"), "-v", "-a")
)
.nativeSettings(
name := "java.logging testSuite on Native"
)
.nativeConfigure(_.dependsOn(root))
.jvmSettings(
name := "java.logging testSuite on JVM",
libraryDependencies += "com.novocode" % "junit-interface" % "0.9" % "test"
)