@@ -4,7 +4,7 @@ import java.net.URL
44
55name := " ijp-toolkit"
66organization := " net.sf.ij-plugins"
7- version := " 2.3.0"
7+ version := " 2.3.0.1-SNAPSHOT "
88
99homepage := Some (new URL (" https://github.com/ij-plugins/ijp-toolkit" ))
1010startYear := Some (2002 )
@@ -22,57 +22,77 @@ description := "<html>" +
2222 " </ul>" +
2323 " </html>"
2424
25- crossScalaVersions := Seq (" 2.13.4 " , " 2.12.13 " )
25+ crossScalaVersions := Seq (" 2.13.6 " , " 3.0.1 " , " 2.12.14 " )
2626scalaVersion := crossScalaVersions.value.head
2727
2828def isScala2_13plus (scalaVersion : String ): Boolean = {
2929 CrossVersion .partialVersion(scalaVersion) match {
30- case Some ((2 , n )) if n >= 13 => true
30+ case Some ((major, minor )) if major > 2 || (major == 2 && minor >= 13 ) => true
3131 case _ => false
3232 }
3333}
3434
3535libraryDependencies ++= Seq (
3636 " org.apache.commons" % " commons-math3" % " 3.6.1" ,
3737 " com.jgoodies" % " jgoodies-binding" % " 2.13.0" ,
38- " net.imagej" % " ij" % " 1.53g " ,
38+ " net.imagej" % " ij" % " 1.53j " ,
3939 // Test
4040 " junit" % " junit" % " 4.13.2" % " test" ,
41- " org.scalatest" %% " scalatest" % " 3.2.3 " % " test" ,
41+ " org.scalatest" %% " scalatest" % " 3.2.9 " % " test" ,
4242 // JUnit runner SBT plugin
4343 " com.novocode" % " junit-interface" % " 0.11" % " test->default"
4444)
4545
4646libraryDependencies ++= (
4747 if (isScala2_13plus(scalaVersion.value)) {
48- Seq (" org.scala-lang.modules" %% " scala-parallel-collections" % " 0.2.0 " )
48+ Seq (" org.scala-lang.modules" %% " scala-parallel-collections" % " 1.0.3 " )
4949 } else {
5050 Seq .empty[ModuleID ]
5151 }
5252 )
5353
5454// Add example directories to test compilation
55- unmanagedSourceDirectories in Test += baseDirectory.value / " examples/scala"
56- unmanagedSourceDirectories in Test += baseDirectory.value / " examples/java"
55+ Test / unmanagedSourceDirectories += baseDirectory.value / " examples/scala"
56+ Test / unmanagedSourceDirectories += baseDirectory.value / " examples/java"
57+
58+ scalacOptions ++= {
59+ Seq (
60+ " -encoding" , " UTF-8" ,
61+ " -feature" ,
62+ " -language:implicitConversions" ,
63+ // disabled during the migration
64+ // "-Xfatal-warnings"
65+ ) ++
66+ (CrossVersion .partialVersion(scalaVersion.value) match {
67+ case Some ((3 , _)) => Seq (
68+ " -unchecked"
69+ )
70+ case _ => Seq (
71+ " -deprecation" ,
72+ // "-Xfatal-warnings",
73+ // "-Wunused:imports,privates,locals",
74+ // "-Wvalue-discard"
75+ )
76+ })
77+ }
5778
58- scalacOptions in(Compile , doc) ++= Seq (
79+ // Options for ScalaDoc
80+ Compile / doc / scalacOptions ++= Seq (
5981 " -doc-title" , " IJ-Plugins Toolkit" ,
6082 " -doc-version" , version.value,
6183 " -doc-root-content" , baseDirectory.value + " /src/main/scala/overview.txt" ,
6284 " -doc-footer" , s " IJ-Plugins Toolkit API v. ${version.value}"
6385)
6486
6587
66-
6788// fork a new JVM for 'run' and 'test:run'
6889fork := true
6990
7091// add a JVM option to use when forking a JVM for 'run'
7192javaOptions ++= Seq (" -Xmx2G" , " -server" )
72- javacOptions in(Compile , compile) ++= Seq (" -deprecation" , " -Xlint:all" , " -source" , " 1.8" , " -target" , " 1.8" )
73-
74- // Set the prompt (for this build) to include the project id.
75- shellPrompt in ThisBuild := { state => " sbt:" + Project .extract(state).currentRef.project + " > " }
93+ Compile / compile / javacOptions ++= Seq (
94+ // "-deprecation", "-Xlint:all",
95+ " -source" , " 1.8" , " -target" , " 1.8" )
7696
7797//
7898// Setup sbt-imagej plugin
@@ -83,7 +103,7 @@ ijPluginsSubDir := "ij-plugins"
83103ijCleanBeforePrepareRun := true
84104cleanFiles += ijPluginsDir.value
85105
86- baseDirectory in run := baseDirectory.value / " sandbox"
106+ run / baseDirectory := baseDirectory.value / " sandbox"
87107
88108//
89109// Customize Java style publishing
0 commit comments