Skip to content

Commit

Permalink
Merge 2e9926e into 528df2a
Browse files Browse the repository at this point in the history
  • Loading branch information
jcazevedo committed Apr 7, 2021
2 parents 528df2a + 2e9926e commit ec1fc2d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
24 changes: 12 additions & 12 deletions build.sbt
Expand Up @@ -4,10 +4,10 @@ import Dependencies.Version._
import Utilities._
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._

organization in ThisBuild := "com.github.pureconfig"
ThisBuild / organization := "com.github.pureconfig"

// Enable the OrganizeImports Scalafix rule.
scalafixDependencies in ThisBuild += "com.github.liancheng" %% "organize-imports" % "0.5.0"
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.5.0"

lazy val core = (project in file("core"))
.enablePlugins(BoilerplatePlugin, SbtOsgi)
Expand Down Expand Up @@ -82,15 +82,15 @@ lazy val commonSettings = Seq(

resolvers ++= Seq(Resolver.sonatypeRepo("releases"), Resolver.sonatypeRepo("snapshots")),

crossVersionSharedSources(unmanagedSourceDirectories in Compile),
crossVersionSharedSources(unmanagedSourceDirectories in Test),
crossVersionSharedSources(Compile / unmanagedSourceDirectories),
crossVersionSharedSources(Test / unmanagedSourceDirectories),

scalacOptions ++= lintFlags.value,

scalacOptions in Test ~= { _.filterNot(_.contains("-Ywarn-unused")) },
Test / scalacOptions ~= { _.filterNot(_.contains("-Ywarn-unused")) },

scalacOptions in (Compile, console) --= Seq("-Xfatal-warnings", "-Ywarn-unused-import", "-Ywarn-unused:_,-implicits"),
scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value,
Compile / console / scalacOptions --= Seq("-Xfatal-warnings", "-Ywarn-unused-import", "-Ywarn-unused:_,-implicits"),
Test / console / scalacOptions := (Compile / console / scalacOptions).value,

// Even though Scalafmt won't raise any issues as long as you don't use Scala 3 specific syntax, it still lacks
// support for it (https://github.com/scalameta/scalafmt/issues/2216).
Expand All @@ -106,7 +106,7 @@ lazy val commonSettings = Seq(
autoAPIMappings := true,

publishMavenStyle := true,
publishArtifact in Test := false,
Test / publishArtifact := false,
publishTo := sonatypePublishToBundle.value
// format: on
)
Expand Down Expand Up @@ -172,12 +172,12 @@ lazy val lintFlags = forScalaVersions {
scalaVersion := scala212

// do not publish the root project
skip in publish := true
publish / skip := true

releaseCrossBuild := true
releaseTagComment := s"Release ${(version in ThisBuild).value}"
releaseCommitMessage := s"Set version to ${(version in ThisBuild).value}"
releaseNextCommitMessage := s"Set version to ${(version in ThisBuild).value}"
releaseTagComment := s"Release ${(ThisBuild / version).value}"
releaseCommitMessage := s"Set version to ${(ThisBuild / version).value}"
releaseNextCommitMessage := s"Set version to ${(ThisBuild / version).value}"

// redefine the release process due to https://github.com/sbt/sbt-release/issues/184
// and to append `sonatypeReleaseAll`
Expand Down
1 change: 0 additions & 1 deletion project/plugins.sbt
@@ -1,4 +1,3 @@
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.4")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.26")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.2")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15")
Expand Down
6 changes: 3 additions & 3 deletions testkit/build.sbt
Expand Up @@ -6,11 +6,11 @@ crossScalaVersions := Seq(scala212, scala213, scala30)

libraryDependencies ++= Seq(
Dependencies.scalaTest,
Dependencies.scalaCheck.withDottyCompat(scalaVersion.value),
Dependencies.scalaCheck.cross(CrossVersion.for3Use2_13),
// We need to ignore the transitive dependencies to avoid having scalatest-core and scalactic with conflicting
// cross-version suffixes, since we'd get the native 3.x version from the `scalaTest` dependency and the 2.x
// dependency from `scalaTestPlusScalaCheck` with the `withDottyCompat` flag.
Dependencies.scalaTestPlusScalaCheck.intransitive().withDottyCompat(scalaVersion.value)
// dependency from `scalaTestPlusScalaCheck` with the `cross(CrossVersion.for3Use2_13)` flag.
Dependencies.scalaTestPlusScalaCheck.intransitive().cross(CrossVersion.for3Use2_13)
)

// This is to avoid a warning due to the intransitive dependency of scalaTestPlusScalaCheck.
Expand Down

0 comments on commit ec1fc2d

Please sign in to comment.