diff --git a/.scalafmt.conf b/.scalafmt.conf index 90c0a9e..10ad8d3 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 2.7.5 +version = 3.0.0 maxColumn = 120 style = defaultWithAlign optIn.breaksInsideChains = true diff --git a/build.sbt b/build.sbt index a2f125d..7e0cbb2 100644 --- a/build.sbt +++ b/build.sbt @@ -26,9 +26,9 @@ val buildSettings = Seq[Setting[_]]( Developer(id = "leo", name = "Taro L. Saito", email = "leo@xerial.org", url = url("http://xerial.org/leo")) ), sonatypeProfileName := "org.wvlet", - crossPaths := true, - publishMavenStyle := true, - publishTo := sonatypePublishToBundle.value, + crossPaths := true, + publishMavenStyle := true, + publishTo := sonatypePublishToBundle.value, javacOptions ++= Seq("-source", "1.8", "-target", "1.8"), scalacOptions ++= Seq( "-feature", @@ -55,9 +55,9 @@ lazy val sbtAirframe = sbtVersion ), buildInfoPackage := "wvlet.airframe.sbt", - name := "sbt-airframe", - description := "sbt plugin for helping programming with Airframe", - scalaVersion := SCALA_2_12, + name := "sbt-airframe", + description := "sbt plugin for helping programming with Airframe", + scalaVersion := SCALA_2_12, libraryDependencies ++= Seq( "io.get-coursier" %% "coursier" % "2.0.16", "org.apache.commons" % "commons-compress" % "1.21", diff --git a/project/plugin.sbt b/project/plugin.sbt index 2a47860..38383cf 100755 --- a/project/plugin.sbt +++ b/project/plugin.sbt @@ -1,7 +1,7 @@ -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.9") -addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.9") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addDependencyTreePlugin diff --git a/src/main/scala/wvlet/airframe/sbt/http/AirframeHttpPlugin.scala b/src/main/scala/wvlet/airframe/sbt/http/AirframeHttpPlugin.scala index 4ddbf26..116fe30 100644 --- a/src/main/scala/wvlet/airframe/sbt/http/AirframeHttpPlugin.scala +++ b/src/main/scala/wvlet/airframe/sbt/http/AirframeHttpPlugin.scala @@ -31,12 +31,11 @@ import scala.sys.process._ * sbt plugin for supporting Airframe HTTP development. * * This plugin supports: - * - Building a Router by scanning interfaces that have methods with @Endpoint annotations in the project - * - Generate HTTP client code for Scala and Scala.js. + * - Building a Router by scanning interfaces that have methods with @Endpoint annotations in the project + * - Generate HTTP client code for Scala and Scala.js. * - * The client code generator is defined in wvlet.airframe.http.codegen package. - * This plugin downloads a pre-built archive (airframe-http_(scala version)-(airframe version).tgz) and - * invoke HttpClientGenerator. + * The client code generator is defined in wvlet.airframe.http.codegen package. This plugin downloads a pre-built + * archive (airframe-http_(scala version)-(airframe version).tgz) and invoke HttpClientGenerator. */ object AirframeHttpPlugin extends AutoPlugin with LogSupport { wvlet.airframe.log.init @@ -240,7 +239,7 @@ object AirframeHttpPlugin extends AutoPlugin with LogSupport { version = version.value ), airframeHttpOpenAPITargetDir := target.value, - airframeHttpOpenAPIPackages := Seq.empty, + airframeHttpOpenAPIPackages := Seq.empty, airframeHttpOpenAPIGenerate := Def .task { val config = airframeHttpOpenAPIConfig.value diff --git a/src/sbt-test/sbt-airframe/generate-client/build.sbt b/src/sbt-test/sbt-airframe/generate-client/build.sbt index e9db0aa..c6981f5 100644 --- a/src/sbt-test/sbt-airframe/generate-client/build.sbt +++ b/src/sbt-test/sbt-airframe/generate-client/build.sbt @@ -8,7 +8,6 @@ ThisBuild / resolvers += Resolver.sonatypeRepo("snapshots") lazy val root = project.aggregate(spi, server) - lazy val spi = project .in(file("spi")) diff --git a/src/sbt-test/sbt-airframe/generate-client/project/plugins.sbt b/src/sbt-test/sbt-airframe/generate-client/project/plugins.sbt index d30e096..3dd34be 100644 --- a/src/sbt-test/sbt-airframe/generate-client/project/plugins.sbt +++ b/src/sbt-test/sbt-airframe/generate-client/project/plugins.sbt @@ -2,6 +2,6 @@ ThisBuild / resolvers += Resolver.sonatypeRepo("snapshots") sys.props.get("plugin.version") match { case Some(x) => addSbtPlugin("org.wvlet.airframe" % "sbt-airframe" % x) - case _ => sys.error("""|The system property 'plugin.version' is not defined. + case _ => sys.error("""|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) } diff --git a/src/sbt-test/sbt-airframe/grpc/build.sbt b/src/sbt-test/sbt-airframe/grpc/build.sbt index c649669..a7d817c 100644 --- a/src/sbt-test/sbt-airframe/grpc/build.sbt +++ b/src/sbt-test/sbt-airframe/grpc/build.sbt @@ -25,7 +25,7 @@ lazy val server = .enablePlugins(AirframeHttpPlugin) .settings(buildSettings) .settings( - Test / fork := true, + Test / fork := true, airframeHttpGeneratorOption := "-l trace", airframeHttpClients := Seq( "example.api:grpc" diff --git a/src/sbt-test/sbt-airframe/grpc/project/plugins.sbt b/src/sbt-test/sbt-airframe/grpc/project/plugins.sbt index 1fbb67e..9c14350 100644 --- a/src/sbt-test/sbt-airframe/grpc/project/plugins.sbt +++ b/src/sbt-test/sbt-airframe/grpc/project/plugins.sbt @@ -1,6 +1,6 @@ ThisBuild / resolvers += Resolver.sonatypeRepo("snapshots") sys.props.get("plugin.version") match { case Some(x) => addSbtPlugin("org.wvlet.airframe" % "sbt-airframe" % x) - case _ => sys.error("""|The system property 'plugin.version' is not defined. + case _ => sys.error("""|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) } diff --git a/src/sbt-test/sbt-airframe/js-client/build.sbt b/src/sbt-test/sbt-airframe/js-client/build.sbt index 71c13f6..60219b3 100644 --- a/src/sbt-test/sbt-airframe/js-client/build.sbt +++ b/src/sbt-test/sbt-airframe/js-client/build.sbt @@ -20,7 +20,7 @@ lazy val client = .enablePlugins(AirframeHttpPlugin) .settings( airframeHttpGeneratorOption := "-l trace", - airframeHttpClients := Seq("myapp.spi:scalajs") + airframeHttpClients := Seq("myapp.spi:scalajs") ) .jsSettings( libraryDependencies ++= Seq( diff --git a/src/sbt-test/sbt-airframe/js-client/client/src/main/scala/myspp/client/Main.scala b/src/sbt-test/sbt-airframe/js-client/client/src/main/scala/myspp/client/Main.scala index 9d66c19..76442a4 100644 --- a/src/sbt-test/sbt-airframe/js-client/client/src/main/scala/myspp/client/Main.scala +++ b/src/sbt-test/sbt-airframe/js-client/client/src/main/scala/myspp/client/Main.scala @@ -4,7 +4,7 @@ import myapp.spi._ object Main { - val jsClient = new ServiceJSClient() + val jsClient = new ServiceJSClient() val rpcClient = new ServiceJSClientRx() import MyRPC._ diff --git a/src/sbt-test/sbt-airframe/js-client/project/plugins.sbt b/src/sbt-test/sbt-airframe/js-client/project/plugins.sbt index ed4ebae..6bae034 100644 --- a/src/sbt-test/sbt-airframe/js-client/project/plugins.sbt +++ b/src/sbt-test/sbt-airframe/js-client/project/plugins.sbt @@ -1,7 +1,7 @@ ThisBuild / resolvers += Resolver.sonatypeRepo("snapshots") sys.props.get("plugin.version") match { case Some(x) => addSbtPlugin("org.wvlet.airframe" % "sbt-airframe" % x) - case _ => sys.error("""|The system property 'plugin.version' is not defined. + case _ => sys.error("""|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) } diff --git a/src/sbt-test/sbt-airframe/openapi/build.sbt b/src/sbt-test/sbt-airframe/openapi/build.sbt index bcbbc1c..680a27e 100644 --- a/src/sbt-test/sbt-airframe/openapi/build.sbt +++ b/src/sbt-test/sbt-airframe/openapi/build.sbt @@ -2,11 +2,11 @@ ThisBuild / resolvers += Resolver.sonatypeRepo("snapshots") enablePlugins(AirframeHttpPlugin) -name := "Open API Test" +name := "Open API Test" version := "1.0.0" airframeHttpOpenAPIPackages := Seq("example.api") -airframeHttpOpts := "-l debug" +airframeHttpOpts := "-l debug" libraryDependencies ++= Seq( "org.wvlet.airframe" %% "airframe-http" % sys.props("airframe.version") ) diff --git a/src/sbt-test/sbt-airframe/openapi/project/plugins.sbt b/src/sbt-test/sbt-airframe/openapi/project/plugins.sbt index 1fbb67e..9c14350 100644 --- a/src/sbt-test/sbt-airframe/openapi/project/plugins.sbt +++ b/src/sbt-test/sbt-airframe/openapi/project/plugins.sbt @@ -1,6 +1,6 @@ ThisBuild / resolvers += Resolver.sonatypeRepo("snapshots") sys.props.get("plugin.version") match { case Some(x) => addSbtPlugin("org.wvlet.airframe" % "sbt-airframe" % x) - case _ => sys.error("""|The system property 'plugin.version' is not defined. + case _ => sys.error("""|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) }