Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sbt and libs #1029

Merged
merged 2 commits into from
May 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.5]
java: [adopt@1.8, adopt@1.11, adopt@1.15]
scala: [2.13.6]
java: [adopt@1.8, adopt@1.11, adopt@1.16]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
Expand Down
42 changes: 21 additions & 21 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lazy val apfloatVersion = "1.10.0"
lazy val jscienceVersion = "4.3.1"
lazy val apacheCommonsMath3Version = "3.6.1"

val Scala213 = "2.13.5"
val Scala213 = "2.13.6"

ThisBuild / crossScalaVersions := Seq(Scala213)
ThisBuild / scalaVersion := Scala213
Expand All @@ -25,7 +25,7 @@ ThisBuild / organization := "org.typelevel"
ThisBuild / githubWorkflowArtifactUpload := false

ThisBuild / githubWorkflowPublishTargetBranches := Seq()
ThisBuild / githubWorkflowJavaVersions := Seq("adopt@1.8", "adopt@1.11", "adopt@1.15")
ThisBuild / githubWorkflowJavaVersions := Seq("adopt@1.8", "adopt@1.11", "adopt@1.16")
ThisBuild / githubWorkflowBuild := Seq(
WorkflowStep
.Sbt(List("scalafmtCheckAll", "scalafmtSbtCheck"), name = Some("Check formatting")),
Expand Down Expand Up @@ -254,8 +254,8 @@ lazy val commonSettings = Seq(
) ++ scalaMacroDependencies ++ warnUnusedImport

lazy val commonJsSettings = Seq(
scalaJSStage in Global := FastOptStage,
parallelExecution in Test := false,
Global / scalaJSStage := FastOptStage,
Test / parallelExecution := false,
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule) }
)

Expand All @@ -264,7 +264,7 @@ lazy val commonJvmSettings = Seq()
lazy val docsMappingsAPIDir = settingKey[String]("Name of subdirectory in site target directory for api docs")

lazy val docSettings = Seq(
scalacOptions in Tut := (scalacOptions in Tut).value.filterNot(Set("-Ywarn-unused-imports", "-Xlint").contains),
Tut / scalacOptions := (Tut / scalacOptions).value.filterNot(Set("-Ywarn-unused-imports", "-Xlint").contains),
micrositeName := "Spire",
micrositeDescription := "Powerful new number types and numeric abstractions for Scala",
micrositeAuthor := "Spire contributors",
Expand Down Expand Up @@ -319,27 +319,27 @@ lazy val docSettings = Seq(
)
),
autoAPIMappings := true,
unidocProjectFilter in (ScalaUnidoc, unidoc) :=
ScalaUnidoc / unidoc / unidocProjectFilter :=
inProjects(platform.jvm, macros.jvm, data.jvm, legacy.jvm, util.jvm, core.jvm, extras.jvm, laws.jvm),
docsMappingsAPIDir := "api",
addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), docsMappingsAPIDir),
addMappingsToSiteDir(ScalaUnidoc / packageDoc / mappings, docsMappingsAPIDir),
ghpagesNoJekyll := false,
fork := true,
javaOptions += "-Xmx4G", // to have enough memory in forks
// fork in tut := true,
// fork in (ScalaUnidoc, unidoc) := true,
scalacOptions in (ScalaUnidoc, unidoc) ++= Seq(
ScalaUnidoc / unidoc / scalacOptions ++= Seq(
"-groups",
"-doc-source-url",
scmInfo.value.get.browseUrl + "/tree/master€{FILE_PATH}.scala",
"-sourcepath",
baseDirectory.in(LocalRootProject).value.getAbsolutePath,
(LocalRootProject / baseDirectory).value.getAbsolutePath,
"-diagrams"
),
scalacOptions in Tut ~= (_.filterNot(Set("-Ywarn-unused-import", "-Ywarn-dead-code"))),
Tut / scalacOptions ~= (_.filterNot(Set("-Ywarn-unused-import", "-Ywarn-dead-code"))),
git.remoteRepo := "git@github.com:typelevel/spire.git",
includeFilter in makeSite := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.yml" | "*.md" | "*.svg",
includeFilter in Jekyll := (includeFilter in makeSite).value
makeSite / includeFilter := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.yml" | "*.md" | "*.svg",
Jekyll / includeFilter := (makeSite / includeFilter).value
)

lazy val publishSettings = Seq(
Expand All @@ -362,7 +362,7 @@ lazy val publishSettings = Seq(
) ++ credentialSettings ++ sharedPublishSettings ++ sharedReleaseProcess

lazy val scoverageSettings = Seq(
coverageMinimum := 40,
coverageMinimumStmtTotal := 40,
coverageFailOnMinimum := false,
coverageHighlighting := true,
coverageExcludedPackages := "spire\\.benchmark\\..*;spire\\.macros\\..*"
Expand All @@ -371,9 +371,9 @@ lazy val scoverageSettings = Seq(
lazy val coreSettings = Seq(
buildInfoKeys := Seq[BuildInfoKey](version, scalaVersion),
buildInfoPackage := "spire",
sourceGenerators in Compile += (genProductTypes in Compile).taskValue,
Compile / sourceGenerators += (Compile / genProductTypes).taskValue,
genProductTypes := {
val scalaSource = (sourceManaged in Compile).value
val scalaSource = (Compile / sourceManaged).value
val s = streams.value
s.log.info("Generating spire/std/tuples.scala")
val algebraSource = ProductTypes.algebraProductTypes
Expand Down Expand Up @@ -404,7 +404,7 @@ lazy val munitSettings = Seq(
lazy val spireSettings = buildSettings ++ commonSettings ++ commonDeps ++ publishSettings ++ scoverageSettings

lazy val unidocSettings = Seq(
unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects(examples, benchmark, tests.jvm)
ScalaUnidoc / unidoc / unidocProjectFilter := inAnyProject -- inProjects(examples, benchmark, tests.jvm)
)

////////////////////////////////////////////////////////////////////////////////////////////////////
Expand All @@ -423,8 +423,8 @@ lazy val noPublishSettings = Seq(

lazy val crossVersionSharedSources: Seq[Setting[_]] =
Seq(Compile, Test).map { sc =>
(unmanagedSourceDirectories in sc) ++= {
(unmanagedSourceDirectories in sc).value.map { dir: File =>
(sc / unmanagedSourceDirectories) ++= {
(sc / unmanagedSourceDirectories).value.map { dir: File =>
CrossVersion.partialVersion(scalaBinaryVersion.value) match {
case Some((major, minor)) =>
new File(s"${dir.getPath}_$major.$minor")
Expand Down Expand Up @@ -470,7 +470,7 @@ lazy val sharedPublishSettings = Seq(
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishMavenStyle := true,
publishArtifact in Test := false,
Test / publishArtifact := false,
pomIncludeRepository := Function.const(false),
publishTo := {
val nexus = "https://oss.sonatype.org/"
Expand Down Expand Up @@ -508,8 +508,8 @@ lazy val warnUnusedImport = Seq(
case _ => Seq()
}
},
scalacOptions in (Compile, console) ~= { _.filterNot("-Ywarn-unused-import" == _) },
scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value
Compile / console / scalacOptions ~= { _.filterNot("-Ywarn-unused-import" == _) },
Test / console / scalacOptions := (Compile / console / scalacOptions).value
)

// For Travis CI - see http://www.cakesolutions.net/teamblogs/publishing-artefacts-to-oss-sonatype-nexus-using-sbt-and-travis-ci
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.18.0-SNAPSHOT"
ThisBuild / version := "0.18.0-SNAPSHOT"