Skip to content

Commit 1e0eb5b

Browse files
authored
Update Scala Native to 0.4.0 (#36)
* Publish 0.1.1 to Sonatype * Update Scala Native to 0.4.0 * Run compile and test on all scala Versions * Fix cross-compile errors
1 parent 606d020 commit 1e0eb5b

File tree

12 files changed

+294
-315
lines changed

12 files changed

+294
-315
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ before_install:
1414
- sudo apt-get update
1515
- sudo apt-get install -y libuv1-dev
1616
script:
17-
- sbt compile test
17+
- sbt +compile +test
1818
cache:
1919
directories:
2020
- $HOME/.sbt

build.sbt

Lines changed: 53 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,65 @@
1-
homepage := Some(url("https://github.com/scala-native/scala-native-loop"))
2-
licenses := Seq(
3-
"Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
4-
)
5-
61
Global / onChangedBuildSource := ReloadOnSourceChanges
72

8-
publishMavenStyle := true
9-
Test / publishArtifact := false
10-
pomIncludeRepository := { _ => false }
11-
ThisBuild / publishTo := {
12-
val nexus = "https://oss.sonatype.org/"
13-
if (isSnapshot.value)
14-
Some("snapshots" at nexus + "content/repositories/snapshots")
15-
else
16-
Some("releases" at nexus + "service/local/staging/deploy/maven2")
17-
}
18-
scmInfo := Some(
19-
ScmInfo(
20-
url("https://github.com/scala-native/scala-native-loop"),
21-
"scm:git:[email protected]:scala-native/scala-native-loop.git"
3+
inThisBuild(
4+
Seq(
5+
organization := "com.github.lolgab",
6+
version := "0.2.0-SNAPSHOT",
7+
scalaVersion := scala212
228
)
239
)
24-
developers := List(
25-
Developer(
26-
"rwhaling",
27-
"Richard Whaling",
28-
29-
url("http://whaling.dev")
10+
11+
val publishSettings = Seq(
12+
publishMavenStyle := true,
13+
Test / publishArtifact := false,
14+
pomIncludeRepository := { _ => false },
15+
homepage := Some(url("https://github.com/scala-native/scala-native-loop")),
16+
licenses := Seq(
17+
"Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
18+
),
19+
publishTo := sonatypePublishToBundle.value,
20+
scmInfo := Some(
21+
ScmInfo(
22+
url("https://github.com/lolgab/scala-native-loop"),
23+
"scm:git:[email protected]:lolgab/scala-native-loop.git"
24+
)
25+
),
26+
developers := List(
27+
Developer(
28+
"rwhaling",
29+
"Richard Whaling",
30+
31+
url("http://whaling.dev")
32+
)
3033
)
3134
)
3235

36+
val noPublishSettings = Seq(
37+
publish := {},
38+
publishLocal := {},
39+
publishArtifact := false,
40+
skip in publish := true
41+
)
42+
43+
val scala213 = "2.13.4"
44+
val scala212 = "2.12.13"
45+
val scala211 = "2.11.12"
46+
3347
lazy val commonSettings = Seq(
34-
organization := "dev.whaling",
35-
version := "0.1.1-SNAPSHOT",
36-
scalaVersion := "2.11.12",
48+
scalaVersion := scala213,
49+
crossScalaVersions := Seq(scala213, scala212, scala211),
3750
scalacOptions ++= Seq(
3851
"-deprecation",
3952
"-encoding",
4053
"utf8",
4154
"-feature",
4255
"-unchecked",
4356
"-Xfatal-warnings",
44-
"-Ywarn-unused-import"
57+
// "-Wunused:imports"
4558
),
46-
Compile / doc / scalacOptions -= "-Xfatal-warnings",
47-
libraryDependencies += "com.lihaoyi" %%% "utest" % "0.7.5" % Test,
59+
Compile / doc / sources := Seq.empty,
60+
libraryDependencies += "com.github.lolgab" %%% "utest" % "0.7.5" % Test,
4861
testFrameworks += new TestFramework("utest.runner.Framework"),
4962
Test / nativeLinkStubs := true,
50-
publish / skip := true,
51-
publishLocal / skip := true
5263
)
5364

5465
lazy val examplesSettings = Seq(
@@ -59,38 +70,39 @@ lazy val core = project
5970
.in(file("core"))
6071
.settings(name := "native-loop-core")
6172
.settings(commonSettings)
62-
.settings(publish / skip := false)
63-
.settings(publishLocal / skip := false)
73+
.settings(publishSettings)
6474
.enablePlugins(ScalaNativePlugin)
6575

6676
lazy val pipe = project
6777
.in(file("pipe"))
6878
.settings(commonSettings)
6979
.settings(test := {})
80+
.settings(noPublishSettings)
7081
.enablePlugins(ScalaNativePlugin)
7182
.dependsOn(core)
7283

7384
lazy val client = project
7485
.in(file("client"))
7586
.settings(commonSettings)
7687
.settings(test := {})
88+
.settings(noPublishSettings)
7789
.enablePlugins(ScalaNativePlugin)
7890
.dependsOn(core)
7991

8092
lazy val server = project
8193
.in(file("server"))
8294
.settings(commonSettings)
8395
.settings(test := {})
96+
.settings(noPublishSettings)
8497
.enablePlugins(ScalaNativePlugin)
8598
.dependsOn(core)
8699

87100
lazy val scalaJsCompat = project
88101
.in(file("scalajs-compat"))
89102
.settings(name := "native-loop-js-compat")
90103
.settings(commonSettings)
104+
.settings(publishSettings)
91105
.settings(test := {})
92-
.settings(publish / skip := false)
93-
.settings(publishLocal / skip := false)
94106
.enablePlugins(ScalaNativePlugin)
95107
.dependsOn(core)
96108

@@ -100,6 +112,7 @@ lazy val serverExample = project
100112
commonSettings,
101113
examplesSettings
102114
)
115+
.settings(noPublishSettings)
103116
.enablePlugins(ScalaNativePlugin)
104117
.dependsOn(core, server, client)
105118

@@ -109,6 +122,7 @@ lazy val pipeExample = project
109122
commonSettings,
110123
examplesSettings
111124
)
125+
.settings(noPublishSettings)
112126
.enablePlugins(ScalaNativePlugin)
113127
.dependsOn(core, pipe, client)
114128

@@ -118,6 +132,7 @@ lazy val curlExample = project
118132
commonSettings,
119133
examplesSettings
120134
)
135+
.settings(noPublishSettings)
121136
.enablePlugins(ScalaNativePlugin)
122137
.dependsOn(core, client)
123138

@@ -127,5 +142,6 @@ lazy val timerExample = project
127142
commonSettings,
128143
examplesSettings
129144
)
145+
.settings(noPublishSettings)
130146
.enablePlugins(ScalaNativePlugin)
131147
.dependsOn(core)

0 commit comments

Comments
 (0)