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 build to sbt 1.5.1 #191

Merged
merged 4 commits into from
May 3, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 20 additions & 15 deletions project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ object ProjectPlugin extends AutoPlugin {
): CrossProject =
CrossProject(modName, file(s"$prefix$modName"))(
JSPlatform,
JVMPlatform /*, NativePlatform // soon */ )
JVMPlatform /*, NativePlatform // soon */
)
.crossType(CrossType.Pure)
.withoutSuffixFor(JVMPlatform)
.build()
.jvmSettings(fork in Test := true)
.jvmSettings(Test / fork := true)
.settings(moduleName := s"droste-$modName")

def jvmModule(
Expand All @@ -35,7 +36,7 @@ object ProjectPlugin extends AutoPlugin {
): Project =
Project(modName, file(s"$prefix$modName"))
.settings(
fork in Test := true,
Test / fork := true,
moduleName := s"droste-$modName"
)

Expand All @@ -44,13 +45,16 @@ object ProjectPlugin extends AutoPlugin {
scalaOrganization.value % "scala-compiler" % scalaVersion.value % Provided,
scalaOrganization.value % "scala-reflect" % scalaVersion.value % Provided,
compilerPlugin(
"org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.patch)
))
"org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.patch
)
)
)

lazy val noPublishSettings: Seq[Def.Setting[_]] = Seq(
publish := ((): Unit),
publishLocal := ((): Unit),
publishArtifact := false)
publishArtifact := false
)

lazy val micrositeSettings = Seq(
micrositeName := "Droste",
Expand All @@ -60,10 +64,10 @@ object ProjectPlugin extends AutoPlugin {
micrositeGithubOwner := "higherkindness",
micrositeGithubRepo := "droste",
micrositeGitterChannelUrl := "droste-recursion/Lobby",
micrositeExternalLayoutsDirectory := (resourceDirectory in Compile).value / "microsite" / "layouts",
micrositeExternalIncludesDirectory := (resourceDirectory in Compile).value / "microsite" / "includes",
includeFilter in makeSite := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.yml" | "*.md" | "*.svg" | "*.json" | "CNAME",
includeFilter in Jekyll := (includeFilter in makeSite).value,
micrositeExternalLayoutsDirectory := (Compile / resourceDirectory).value / "microsite" / "layouts",
micrositeExternalIncludesDirectory := (Compile / resourceDirectory).value / "microsite" / "includes",
makeSite / includeFilter := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.yml" | "*.md" | "*.svg" | "*.json" | "CNAME",
Jekyll / includeFilter := (makeSite / includeFilter).value,
micrositePushSiteWith := GitHub4s
)

Expand All @@ -78,10 +82,10 @@ object ProjectPlugin extends AutoPlugin {
organization := "io.higherkindness",
name := "droste",
startYear := Option(2018),
parallelExecution in Test := false,
Test / parallelExecution := false,
outputStrategy := Some(StdoutOutput),
connectInput in run := true,
cancelable in Global := true,
run / connectInput := true,
Global / cancelable := true,
crossScalaVersions := List("2.12.10", "2.13.1"),
scalaVersion := "2.12.10"
) ++ publishSettings
Expand All @@ -90,9 +94,10 @@ object ProjectPlugin extends AutoPlugin {
releaseCrossBuild := true,
homepage := Some(url("https://github.com/higherkindness/droste")),
licenses := Seq(
"Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
"Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
),
publishMavenStyle := true,
publishArtifact in Test := false,
Test / publishArtifact := false,
pomIncludeRepository := (_ => false),
publishTo := {
val nexus = "https://oss.sonatype.org/"
Expand Down
14 changes: 8 additions & 6 deletions project/ScalacOptionsPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ object ScalacOptionsPlugin extends AutoPlugin {
case Some((2, 11)) => scalac211Options.value
case _ => Nil
}),
scalacOptions in (Compile, doc) ~= (_.filterNot(scalacOptionsDocsFilter)),
scalacOptions in (Compile, doc) += "-groups",
scalacOptions in (Compile, console) ~= (_.filterNot(
scalacOptionsConsoleFilter)),
scalacOptions in (Test, console) ~= (_.filterNot(
scalacOptionsConsoleFilter))
Compile / doc / scalacOptions ~= (_.filterNot(scalacOptionsDocsFilter)),
Compile / doc / scalacOptions += "-groups",
Compile / console / scalacOptions ~= (_.filterNot(
scalacOptionsConsoleFilter
)),
Test / console / scalacOptions ~= (_.filterNot(
scalacOptionsConsoleFilter
))
)

private[this] def defaultScalac213Options: List[String] =
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.3.13
sbt.version=1.5.1
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.8.1-SNAPSHOT"
ThisBuild / version := "0.8.1-SNAPSHOT"