Skip to content

Commit 370d6c6

Browse files
authored
Merge pull request #319 from cquiroz/next
Prepare next version
2 parents b5152f8 + fdb86b9 commit 370d6c6

File tree

20 files changed

+115
-110
lines changed

20 files changed

+115
-110
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ project/plugins/project/
1111
.history
1212
.cache
1313
.lib/
14+
.bloop/
15+
.metals/
1416

1517
# Java
1618
*.class
@@ -52,4 +54,3 @@ tmp/
5254
# Windows
5355
Desktop.ini
5456
Thumbs.db
55-

.travis.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
language: scala
22

33
scala:
4-
- 2.11.12
5-
- 2.12.7
4+
- 2.11.12
5+
- 2.12.9
66

77
dist: trusty
88

99
jdk:
10-
- oraclejdk8
11-
- openjdk11
10+
- oraclejdk8
11+
- openjdk11
1212

1313
branches:
1414
except:
1515
- /^wip-.*$/
1616

1717
env:
18-
- TRAVIS_NODE_VERSION="10.9.0" SCALAJS_VERSION="0.6.25"
19-
- TRAVIS_NODE_VERSION="10.9.0" SCALAJS_VERSION="1.0.0-M6"
18+
- TRAVIS_NODE_VERSION="10.9.0" SCALAJS_VERSION="0.6.28"
19+
# - TRAVIS_NODE_VERSION="10.9.0" SCALAJS_VERSION="1.0.0-M8"
2020

2121
install:
2222
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
@@ -32,19 +32,17 @@ cache:
3232
- $HOME/.nvm
3333

3434
before_cache:
35-
- find $HOME/.sbt -name "*.lock" -type f -delete
36-
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete
35+
# Cleanup the cached directories to avoid unnecessary cache updates
36+
- rm -fv $HOME/.ivy2/.sbt.ivy.lock
37+
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
38+
- find $HOME/.sbt -name "*.lock" -print -delete
3739

3840
script:
3941
# Your normal script
4042
- sbt ++$TRAVIS_SCALA_VERSION squantsJVM/compile squantsJS/compile squantsJS/fastOptJS
4143
- if [[ $TRAVIS_SCALA_VERSION == "2.11.12" ]]; then sbt ++$TRAVIS_SCALA_VERSION squantsNative/compile; fi;
42-
- if [[ $SCALAJS_VERSION == "0.6.25" ]]; then sbt ++$TRAVIS_SCALA_VERSION squantsJS/test squantsJVM/test; fi;
43-
- sbt ++$TRAVIS_SCALA_VERSION squantsJS/doc squantsJVM/doc tut
44-
45-
# Tricks to avoid unnecessary cache updates
46-
- find $HOME/.sbt -name "*.lock" | xargs rm
47-
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
44+
- if [[ $SCALAJS_VERSION == "0.6.28" ]]; then sbt ++$TRAVIS_SCALA_VERSION squantsJS/test; fi;
45+
- sbt ++$TRAVIS_SCALA_VERSION squantsJVM/test
4846

4947
after_success:
5048
- bash <(curl -s https://codecov.io/bash)

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ All types are immutable and thread-safe.
1515
|
1616
[![Join the chat at https://gitter.im/typelevel/squants](https://badges.gitter.im/typelevel/squants.svg)](https://gitter.im/typelevel/squants?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1717
|
18-
[![Scaladocs](https://www.javadoc.io/badge/org.typelevel/squants_2.12.svg?label=scaladoc)](https://static.javadoc.io/org.typelevel/squants_2.12/1.4.0/squants/index.html)
18+
[![Scaladocs](https://www.javadoc.io/badge/org.typelevel/squants_2.12.svg?label=scaladoc)](https://static.javadoc.io/org.typelevel/squants_2.12/1.5.0/squants/index.html)
1919
|
2020
[![Build Status](https://travis-ci.org/typelevel/squants.png?branch=master)](https://travis-ci.org/typelevel/squants)
2121

2222

2323
### Current Versions
24-
Current Release: **1.4.0**
25-
([API Docs](https://oss.sonatype.org/service/local/repositories/releases/archive/org/typelevel/squants_2.12/1.4.0/squants_2.12-1.4.0-javadoc.jar/!/index.html#squants.package))
24+
Current Release: **1.5.0**
25+
([API Docs](https://oss.sonatype.org/service/local/repositories/releases/archive/org/typelevel/squants_2.12/1.5.0/squants_2.12-1.5.0-javadoc.jar/!/index.html#squants.package))
2626

27-
Development Build: **1.5.0-SNAPSHOT**
28-
([API Docs](https://oss.sonatype.org/service/local/repositories/snapshots/archive/org/typelevel/squants_2.12/1.5.0-SNAPSHOT/squants_2.12-1.5.0-SNAPSHOT-javadoc.jar/!/index.html#squants.package))
27+
Development Build: **1.6.0-SNAPSHOT**
28+
([API Docs](https://oss.sonatype.org/service/local/repositories/snapshots/archive/org/typelevel/squants_2.12/1.6.0-SNAPSHOT/squants_2.12-1.6.0-SNAPSHOT-javadoc.jar/!/index.html#squants.package))
2929

3030
[Release History](https://github.com/typelevel/squants/wiki/Release-History)
3131

@@ -38,10 +38,10 @@ For more information on feature availability of a specific version see the Relea
3838
Repository hosting for Squants is provided by [Sonatype](https://oss.sonatype.org/).
3939
To use Squants in your SBT project add the following dependency to your build.
4040

41-
"org.typelevel" %% "squants" % "1.4.0"
41+
"org.typelevel" %% "squants" % "1.5.0"
4242
or
4343

44-
"org.typelevel" %% "squants" % "1.5.0-SNAPSHOT"
44+
"org.typelevel" %% "squants" % "1.6.0-SNAPSHOT"
4545

4646

4747
To use Squants in your Maven project add the following dependency
@@ -50,13 +50,13 @@ To use Squants in your Maven project add the following dependency
5050
<dependency>
5151
<groupId>org.typelevel</groupId>
5252
<artifactId>squants_2.11</artifactId>
53-
<version>1.4.0</version>
53+
<version>1.5.0</version>
5454
</dependency>
5555
```
5656

5757
Beginning with Squants 0.4.x series, both Scala 2.10 and 2.11 builds are available.
5858
Beginning with Squants 1.x series, Scala 2.10, 2.11 and 2.12 builds are available.
59-
Scala.js is supported on version 0.6.25 and 1.0.0-M6
59+
Scala.js is supported on version 0.6.28 and 1.0.0-M8
6060

6161
To use Squants interactively in the Scala REPL, clone the git repo and run `sbt squantsJVM/console`
6262

@@ -963,7 +963,7 @@ import squants.experimental.unitgroups.si.strict.implicits._
963963
// import squants.experimental.unitgroups.si.strict.implicits._
964964

965965
val siLengths: UnitGroup[Length] = implicitly[UnitGroup[Length]]
966-
// siLengths: squants.experimental.unitgroups.UnitGroup[squants.space.Length] = squants.experimental.unitgroups.si.strict.package$implicits$$anon$1@71f1bb6
966+
// siLengths: squants.experimental.unitgroups.UnitGroup[squants.space.Length] = squants.experimental.unitgroups.si.strict.package$implicits$$anon$1@3bd46477
967967
```
968968

969969
To print out units and their conversion factors to the primary SI unit, you could use this code:
@@ -1020,16 +1020,16 @@ val usCookingUnitGroup = new UnitGroup[Volume] {
10201020
// units don't have to be specified in-order.
10211021
val units: Set[UnitOfMeasure[Volume]] = Set(UsPints, UsGallons, Teaspoons, Tablespoons, UsQuarts, FluidOunces)
10221022
}
1023-
// usCookingUnitGroup: squants.experimental.unitgroups.UnitGroup[squants.space.Volume]{val units: Set[squants.UnitOfMeasure[squants.space.Volume]]} = $anon$1@608b512
1023+
// usCookingUnitGroup: squants.experimental.unitgroups.UnitGroup[squants.space.Volume]{val units: Set[squants.UnitOfMeasure[squants.space.Volume]]} = $anon$1@13cf78bc
10241024

10251025
// squants automatically sorts units
10261026
usCookingUnitGroup.sortedUnits.foreach(println)
1027-
// squants.space.Teaspoons$@6c8ced06
1028-
// squants.space.Tablespoons$@34fbe7f5
1029-
// squants.space.FluidOunces$@d678d65
1030-
// squants.space.UsPints$@71e9406b
1031-
// squants.space.UsQuarts$@f2a1319
1032-
// squants.space.UsGallons$@6e8d9849
1027+
// squants.space.Teaspoons$@754c402e
1028+
// squants.space.Tablespoons$@41f51dac
1029+
// squants.space.FluidOunces$@4151520
1030+
// squants.space.UsPints$@297ee46f
1031+
// squants.space.UsQuarts$@1f76d461
1032+
// squants.space.UsGallons$@5f688205
10331033
```
10341034

10351035
The `UnitGroup` values provided with Squants are only samples and aren't intended to be exhaustive.
@@ -1065,7 +1065,7 @@ import squants.experimental.unitgroups.misc.AstronomicalLengthUnitGroup
10651065
Then create the formatter by passing in a unit group:
10661066
```scala
10671067
val astroFormatter = new DefaultFormatter(AstronomicalLengthUnitGroup)
1068-
// astroFormatter: squants.experimental.formatter.DefaultFormatter[squants.space.Length] = squants.experimental.formatter.DefaultFormatter@36136e90
1068+
// astroFormatter: squants.experimental.formatter.DefaultFormatter[squants.space.Length] = squants.experimental.formatter.DefaultFormatter@4a75b2e0
10691069
```
10701070

10711071
Now, we create some values using human-unfriendly numbers:
@@ -1117,7 +1117,7 @@ import squants.experimental.unitgroups.misc.AstronomicalLengthUnitGroup
11171117

11181118
```scala
11191119
implicit val astroFormatter = new DefaultFormatter(AstronomicalLengthUnitGroup)
1120-
// astroFormatter: squants.experimental.formatter.DefaultFormatter[squants.space.Length] = squants.experimental.formatter.DefaultFormatter@5866ca54
1120+
// astroFormatter: squants.experimental.formatter.DefaultFormatter[squants.space.Length] = squants.experimental.formatter.DefaultFormatter@679fbbc2
11211121

11221122
val earthToJupiter = 588000000.km
11231123
// earthToJupiter: squants.space.Length = 588000000.0 km
@@ -1552,9 +1552,9 @@ To make a release do the following:
15521552
sbt squantsNative/publishSigned
15531553
```
15541554

1555-
* Repeat for scala.js 1.0.0-M6
1555+
* Repeat for scala.js 1.0.0-M8
15561556
```
1557-
SCALAJS_VERSION=1.0.0-M6 sbt +squantsJS/publishSigned
1557+
SCALAJS_VERSION=1.0.0-M8 sbt +squantsJS/publishSigned
15581558
```
15591559

15601560
* Then make a release (Note: after this step the release cannot be replaced)

build.sbt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ lazy val defaultSettings =
88
Console.defaultSettings ++
99
Docs.defaultSettings
1010

11+
Global / onChangedBuildSource := ReloadOnSourceChanges
12+
13+
ThisBuild / turbo := true
14+
1115
lazy val squants =
1216
crossProject(JSPlatform, JVMPlatform, NativePlatform)
1317
.crossType(CrossType.Full)
@@ -18,22 +22,28 @@ lazy val squants =
1822
)
1923
.jvmSettings(
2024
osgiSettings,
25+
scalacOptions in Tut --= Seq("-Ywarn-unused-import", "-Ywarn-unused:imports"),
2126
tutTargetDirectory := file("."),
2227
tutSourceDirectory := file("shared") / "src" / "main" / "tut"
2328
)
2429
.jvmSettings(Tests.defaultSettings: _*)
30+
.jsSettings(Tests.defaultSettings: _*)
2531
.jsSettings(
2632
parallelExecution in Test := false,
27-
excludeFilter in Test := "*Serializer.scala" || "*SerializerSpec.scala"
33+
excludeFilter in Test := "*Serializer.scala" || "*SerializerSpec.scala",
34+
scalacOptions in Tut --= Seq("-Ywarn-unused-import", "-Ywarn-unused:imports"),
35+
sources in (Compile, test) := List() // This is a pity but we can't reliable compile on 1.0.0-M8
36+
)
37+
.nativeSettings(
38+
sources in (Compile, doc) := List() // Can't build docs in native
2839
)
29-
.jsSettings(Tests.defaultSettings: _*)
3040

3141
lazy val root = project.in(file("."))
3242
.settings(defaultSettings: _*)
3343
.settings(
3444
name := "squants",
3545
publish := {},
3646
publishLocal := {},
37-
publishArtifact := false
47+
useGpg := true
3848
)
3949
.aggregate(squants.jvm, squants.js, squants.native)

project/Build.scala

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,31 @@ import com.typesafe.sbt.osgi.SbtOsgi
77
import com.typesafe.sbt.osgi.SbtOsgi.autoImport._
88

99
object Versions {
10-
val Squants = "1.4.0"
10+
val Squants = "1.5.0"
1111
val Scala = "2.11.12" // Don't use 2.12 yet to avoid troubles with native
1212
val scalaJSVersion =
13-
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.25")
13+
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.28")
1414
val ScalaCross =
1515
if (scalaJSVersion.startsWith("0.6")) {
16-
Seq("2.10.7", "2.11.12", "2.12.7")
16+
Seq("2.10.7", "2.11.12", "2.12.9")
1717
} else {
18-
Seq("2.11.12", "2.12.7")
18+
Seq("2.11.12", "2.12.9")
1919
}
2020

21-
val ScalaTest = "3.0.5"
21+
val ScalaTest = "3.1.0-M2"
22+
val ScalaTestOld = "3.0.7"
2223
val ScalaCheck = "1.13.5"
23-
val Json4s = "3.6.1"
24+
val Json4s = "3.6.7"
2425
}
2526

2627
object Dependencies {
28+
val scalaTestOld = Def.setting(Seq("org.scalatest" %%% "scalatest" % Versions.ScalaTestOld % Test))
2729
val scalaTest = Def.setting(Seq("org.scalatest" %%% "scalatest" % Versions.ScalaTest % Test))
2830
val scalaCheck = Def.setting(Seq("org.scalacheck" %%% "scalacheck" % Versions.ScalaCheck % Test))
2931
val json4s = Def.setting(Seq("org.json4s" %% "json4s-native" % Versions.Json4s % Test))
3032
}
3133

3234
object Resolvers {
33-
val typeSafeRepo = "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/"
3435
val sonatypeNexusSnapshots = "Sonatype Nexus Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
3536
val sonatypeNexusReleases = "Sonatype Nexus Releases" at "https://oss.sonatype.org/content/repositories/releases"
3637
val sonatypeNexusStaging = "Sonatype Nexus Staging" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"
@@ -51,7 +52,6 @@ object Project {
5152
autoAPIMappings := true,
5253

5354
resolvers ++= Seq(
54-
Resolvers.typeSafeRepo,
5555
Resolvers.sonatypeNexusSnapshots,
5656
Resolvers.sonatypeNexusReleases,
5757
Resolvers.sonatypeNexusStaging
@@ -65,33 +65,42 @@ object Project {
6565

6666
object Compiler {
6767
lazy val newerCompilerLintSwitches = Seq(
68-
"-Xlint:missing-interpolator", // Not availabile in 2.10
69-
"-Ywarn-unused", // Not available in 2.10
70-
"-Ywarn-unused-import", // Not available in 2.10
71-
"-Ywarn-numeric-widen" // In 2.10 this produces a some strange spurious error
68+
"-Xlint:missing-interpolator",
69+
"-Ywarn-unused",
70+
"-Ywarn-unused-import",
71+
"-Ywarn-numeric-widen",
72+
"-deprecation:false"
7273
)
7374

74-
val defaultSettings = Seq(
75-
scalacOptions in ThisBuild ++= Seq(
76-
"-feature",
75+
lazy val defaultCompilerSwitches = Seq(
76+
"-feature",
77+
"-deprecation",
78+
"-encoding", "UTF-8", // yes, this is 2 args
79+
"-Xfatal-warnings",
80+
"-unchecked",
81+
"-Xfuture",
82+
"-Ywarn-dead-code",
83+
"-Yno-adapted-args"
84+
)
85+
86+
lazy val defaultSettings = Seq(
87+
scalacOptions ++= Seq(
7788
"-deprecation",
78-
"-encoding", "UTF-8", // yes, this is 2 args
79-
"-Xfatal-warnings",
80-
"-unchecked",
81-
"-Xfuture",
82-
"-Ywarn-dead-code",
83-
"-Yno-adapted-args"
89+
"-feature",
90+
"-encoding", "UTF-8",
8491
),
85-
86-
scalacOptions ++= PartialFunction.condOpt(CrossVersion.partialVersion(scalaVersion.value)){
87-
case Some((2, scalaMajor)) if scalaMajor >= 11 => newerCompilerLintSwitches
88-
}.toList.flatten,
92+
scalacOptions := {CrossVersion.partialVersion(scalaVersion.value) match {
93+
case Some((2, scalaMajor)) if scalaMajor >= 11 => scalacOptions.value ++ defaultCompilerSwitches ++ newerCompilerLintSwitches
94+
case _ => scalacOptions.value ++ defaultCompilerSwitches
95+
}},
8996

9097
scalaVersion in ThisBuild := Versions.Scala,
9198

9299
crossScalaVersions := Versions.ScalaCross
93100
)
101+
94102
}
103+
95104
object Publish {
96105
val defaultSettings = Seq(
97106
publishTo := {
@@ -124,16 +133,12 @@ object Publish {
124133

125134
object Tests {
126135
val defaultSettings =
127-
if (Versions.scalaJSVersion.startsWith("0.6")) {
128136
Seq(
129137
libraryDependencies ++=
130138
Dependencies.scalaTest.value ++
131139
Dependencies.scalaCheck.value ++
132140
Dependencies.json4s.value
133141
)
134-
} else {
135-
Seq.empty
136-
}
137142
}
138143

139144
object Formatting {
@@ -169,7 +174,7 @@ object Formatting {
169174

170175
object Console {
171176
val defaultSettings = Seq(
172-
scalacOptions ~= (_ filterNot (Set("-Xfatal-warnings", "-Ywarn-unused-import").contains)),
177+
scalacOptions in (Compile, console) ~= (_ filterNot (Set("-Xfatal-warnings", "-Ywarn-unused-import").contains)),
173178

174179
initialCommands in console := """
175180
import scala.language.postfixOps,
@@ -250,6 +255,6 @@ object Docs {
250255
val (bd, v) = ((baseDirectory in LocalRootProject).value, version.value)
251256
val tagOrBranch = if(v endsWith "SNAPSHOT") gitHash else "v" + v
252257
Seq("-sourcepath", bd.getAbsolutePath, "-doc-source-url", "https://github.com/garyKeorkunian/squants/tree/" + tagOrBranch + "€{FILE_PATH}.scala")
253-
}
258+
},
254259
)
255260
}

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.2.6
1+
sbt.version=1.3.0

project/plugins.sbt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0")
2-
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.6.0")
1+
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.1")
2+
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.6.1")
33
val scalaJSVersion =
4-
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.25")
4+
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.28")
55

66
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
7-
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.8")
7+
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.9")
88

99
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2")
1010

11-
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.3")
11+
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.5")
1212

13-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
13+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.2")
1414

15-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
15+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")
1616

17-
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.6.9")
17+
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.6.12")

0 commit comments

Comments
 (0)