Skip to content

Commit

Permalink
use slash syntax instead of old "in"
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Feb 17, 2021
1 parent fdbc38d commit 91a1e14
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
30 changes: 15 additions & 15 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ lazy val baseSettings = Def.settings(
resolvers ++= _resolvers,
// https://github.com/sbt/sbt/issues/2217
fullResolvers ~= { _.filterNot(_.name == "jcenter") },
transitiveClassifiers in Global := Seq(Artifact.SourceClassifier),
Global / transitiveClassifiers := Seq(Artifact.SourceClassifier),
scalatestVersion := "3.2.3",
specs2Version := "4.10.6",
parserCombinatorsVersion := "1.1.2",
collectionCompatVersion := "2.4.2",
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-encoding", "UTF-8", "-Xlint:-options"),
javacOptions in doc := Seq("-source", "1.8"),
fork in Test := true,
baseDirectory in Test := file("."),
doc / javacOptions := Seq("-source", "1.8"),
Test / fork := true,
Test / baseDirectory := file("."),
addCommandAlias("SetScala3", s"++ ${Scala3}! -v"),
Seq(Compile, Test).map { s =>
s / unmanagedSourceDirectories += {
Expand Down Expand Up @@ -96,19 +96,19 @@ lazy val baseSettings = Def.settings(
"-Xfuture"
)
}.toList.flatten,
scalacOptions in (Compile, doc) ++= Seq(
"-sourcepath", (baseDirectory in LocalRootProject).value.getAbsolutePath,
(Compile / doc / scalacOptions) ++= Seq(
"-sourcepath", (LocalRootProject / baseDirectory).value.getAbsolutePath,
"-doc-source-url", s"https://github.com/scalikejdbc/scalikejdbc/tree/${gitHash}€{FILE_PATH}.scala"
),
mappings in (Compile, packageSrc) ++= (managedSources in Compile).value.map{ f =>
(Compile / packageSrc / mappings) ++= (Compile / managedSources).value.map{ f =>
// to merge generated sources into sources.jar as well
(f, f.relativeTo((sourceManaged in Compile).value).get.getPath)
(f, f.relativeTo((Compile / sourceManaged).value).get.getPath)
},
publishMavenStyle := true,
publishArtifact in Test := false,
Test / publishArtifact := false,
pomIncludeRepository := { x => false },
logBuffered in Test := false,
parallelExecution in Test := false,
Test / logBuffered := false,
Test / parallelExecution := false,
pomExtra := _pomExtra
)

Expand Down Expand Up @@ -187,14 +187,14 @@ lazy val scalikejdbcCore = Project(
sys.error("Working directory is dirty!\n" + diff)
}
},
(sourceGenerators in Compile) += task{
val dir = (sourceManaged in Compile).value
(Compile / sourceGenerators) += task{
val dir = (Compile / sourceManaged).value
val file = dir / "scalikejdbc" / "OneToXSQL.scala"
IO.write(file, GenerateOneToXSQL.value)
Seq(file)
},
(sourceGenerators in Compile) += task[Seq[File]]{
val dir = (sourceManaged in Compile).value
(Compile / sourceGenerators) += task[Seq[File]]{
val dir = (Compile / sourceManaged).value
(3 to 21).map{ n =>
val file = dir / "scalikejdbc" / s"OneToManies${n}SQL.scala"
IO.write(file, GenerateOneToManies(n))
Expand Down
4 changes: 2 additions & 2 deletions project/MimaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ object MimaSettings {
case _ => Set.empty
}
},
test in Test := {
(Test / test) := {
mimaReportBinaryIssues.value
(test in Test).value
(Test / test).value
}
)
}
2 changes: 1 addition & 1 deletion windows_test_filter.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ val excludeTestsIfWindows = Set(
"somewhere.DatabasePublisherTckTest",
)

testOptions in Test in ThisBuild ++= {
ThisBuild / Test / testOptions ++= {
if (scala.util.Properties.isWin) {
Seq(Tests.Exclude(excludeTestsIfWindows))
} else {
Expand Down

0 comments on commit 91a1e14

Please sign in to comment.