diff --git a/build.sbt b/build.sbt index f22946e..077c11c 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ lazy val scala212 = "2.12.18" -lazy val scala3 = "3.6.4" +lazy val scala3 = "3.7.2" ThisBuild / scalaVersion := scala212 ThisBuild / crossScalaVersions := Seq(scala212, scala3) @@ -23,7 +23,7 @@ lazy val plugin = project (pluginCrossBuild / sbtVersion) := { scalaBinaryVersion.value match { case "2.12" => "1.9.0" - case _ => "2.0.0-M4" + case _ => "2.0.0-RC3" } }, scalacOptions ++= { diff --git a/plugin/src/main/scala/com/github/sbt/JavaFormatterPlugin.scala b/plugin/src/main/scala/com/github/sbt/JavaFormatterPlugin.scala index 3fbe045..182226e 100644 --- a/plugin/src/main/scala/com/github/sbt/JavaFormatterPlugin.scala +++ b/plugin/src/main/scala/com/github/sbt/JavaFormatterPlugin.scala @@ -33,11 +33,15 @@ object AutomateJavaFormatterPlugin extends AutoPlugin { object JavaFormatterPlugin extends AutoPlugin { object autoImport { + @transient val javafmt: TaskKey[Unit] = taskKey("Format Java sources") + @transient val javafmtCheck: TaskKey[Boolean] = taskKey("Fail, if a Java source needs reformatting.") + @transient val javafmtAll: TaskKey[Unit] = taskKey( "Execute the javafmt task for all configurations in which it is enabled. " + "(By default this means the Compile and Test configurations.)") + @transient val javafmtCheckAll: TaskKey[Unit] = taskKey( "Execute the javafmtCheck task for all configurations in which it is enabled. " + "(By default this means the Compile and Test configurations.)") @@ -106,6 +110,7 @@ object JavaFormatterPlugin extends AutoPlugin { def notToBeScopedSettings: Seq[Setting[?]] = List(javafmt / includeFilter := "*.java") + @transient private val javafmtDoFormatOnCompile = taskKey[Unit]("Format Java source files if javafmtOnCompile is on.") diff --git a/project/build.properties b/project/build.properties index 61c9b1c..e480c67 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.11.1 +sbt.version=1.11.5