Skip to content

Commit

Permalink
Merge pull request #276 from cquiroz/sbt1.5
Browse files Browse the repository at this point in the history
Update sbt
  • Loading branch information
cquiroz authored Apr 5, 2021
2 parents d3e8d14 + 7fcbad4 commit 13cd8f6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
# run: |
# csbt scalafmtCheckAll
- name: Run test
run: csbt clean +scalajavatimeTestsJVM/test +scalajavatimeTestsJS/test +demo/run
run: sbt clean +scalajavatimeTestsJVM/test +scalajavatimeTestsJS/test +demo/run
38 changes: 19 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ inThisBuild(
)
)

skip in publish := true
publish / skip := true

def scalaVersionSpecificFolders(srcName: String, srcBaseDir: java.io.File, scalaVersion: String) = {
def extraDirs(suffix: String) =
Expand All @@ -55,18 +55,18 @@ lazy val commonSettings = Seq(
scalaVersion := scalaVer,
crossScalaVersions := Seq("2.11.12", "2.12.13", "2.13.5", "3.0.0-RC1", "3.0.0-RC2"),
// Don't include threeten on the binaries
mappings in (Compile, packageBin) := (mappings in (Compile, packageBin)).value.filter {
Compile / packageBin / mappings := (Compile / packageBin / mappings).value.filter {
case (f, s) => !s.contains("threeten")
},
scalacOptions in Compile ++= {
Compile / scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, scalaMajor)) if scalaMajor == 13 =>
Seq("-deprecation:false")
case _ =>
Seq.empty
}
},
scalacOptions in (Compile, doc) := {
Compile / doc / scalacOptions := {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, scalaMajor)) if scalaMajor >= 11 =>
Seq("-deprecation:false")
Expand Down Expand Up @@ -156,17 +156,17 @@ lazy val scalajavatime = crossProject(JVMPlatform, JSPlatform)
val tagOrHash =
if (isSnapshot.value) sys.process.Process("git rev-parse HEAD").lineStream_!.head
else s"v${version.value}"
(sourceDirectories in Compile).value.map { f =>
(Compile / sourceDirectories).value.map { f =>
val a = f.toURI.toString
val g =
"https://raw.githubusercontent.com/cquiroz/scala-java-time/" + tagOrHash + "/shared/src/main/scala/"
s"-P:scalajs:mapSourceURI:$a->$g/"
}
}
},
sourceGenerators in Compile += Def.task {
val srcDirs = (sourceDirectories in Compile).value
val destinationDir = (sourceManaged in Compile).value
Compile / sourceGenerators += Def.task {
val srcDirs = (Compile / sourceDirectories).value
val destinationDir = (Compile / sourceManaged).value
copyAndReplace(srcDirs, destinationDir)
}.taskValue,
libraryDependencies ++= Seq(
Expand All @@ -184,9 +184,9 @@ lazy val scalajavatimeTZDB = crossProject(JVMPlatform, JSPlatform)
.jsSettings(
dbVersion := TzdbPlugin.Version(tzdbVersion),
includeTTBP := true,
sourceGenerators in Compile += Def.task {
val srcDirs = (sourceManaged in Compile).value
val destinationDir = (sourceManaged in Compile).value
Compile / sourceGenerators += Def.task {
val srcDirs = (Compile / sourceManaged).value
val destinationDir = (Compile / sourceManaged).value
copyAndReplace(Seq(srcDirs), destinationDir)
}.taskValue
)
Expand All @@ -211,7 +211,7 @@ lazy val scalajavatimeTests = crossProject(JVMPlatform, JSPlatform)
publishLocal := {},
publishArtifact := false,
Keys.`package` := file(""),
skip.in(compile) := isDotty.value,
Compile / skip := isDotty.value,
libraryDependencies +=
("org.scalatest" %%% "scalatest" % "3.2.7" % "test").withDottyCompat(scalaVersion.value),
scalacOptions ~= (_.filterNot(
Expand All @@ -220,20 +220,20 @@ lazy val scalajavatimeTests = crossProject(JVMPlatform, JSPlatform)
)
.jvmSettings(
// Fork the JVM test to ensure that the custom flags are set
fork in Test := true,
baseDirectory in Test := baseDirectory.value.getParentFile,
Test / fork := true,
Test / baseDirectory := baseDirectory.value.getParentFile,
// Use CLDR provider for locales
// https://docs.oracle.com/javase/8/docs/technotes/guides/intl/enhancements.8.html#cldr
javaOptions in Test ++= Seq("-Duser.language=en",
Test / javaOptions ++= Seq("-Duser.language=en",
"-Duser.country=US",
"-Djava.locale.providers=CLDR"
)
)
.jsSettings(
parallelExecution in Test := false,
sourceGenerators in Test += Def.task {
val srcDirs = (sourceDirectories in Test).value
val destinationDir = (sourceManaged in Test).value
Test / parallelExecution := false,
Test / sourceGenerators += Def.task {
val srcDirs = (Test / sourceDirectories).value
val destinationDir = (Test / sourceManaged).value
copyAndReplace(srcDirs, destinationDir)
}.taskValue,
libraryDependencies ++= Seq(
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.4.9
sbt.version=1.5.0

0 comments on commit 13cd8f6

Please sign in to comment.