Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Commit

Permalink
Update scalafmt-core to 3.0.0 (#17)
Browse files Browse the repository at this point in the history
* Update scalafmt-core to 3.0.0

* Reformat with scalafmt 3.0.0
  • Loading branch information
scala-steward authored Aug 25, 2021
1 parent 692c8f6 commit 7eccabb
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 2.7.5
version = 3.0.0
maxColumn = 120
style = defaultWithAlign
optIn.breaksInsideChains = true
Expand Down
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions project/plugin.sbt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
11 changes: 5 additions & 6 deletions src/main/scala/wvlet/airframe/sbt/http/AirframeHttpPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/sbt-test/sbt-airframe/generate-client/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ ThisBuild / resolvers += Resolver.sonatypeRepo("snapshots")
lazy val root =
project.aggregate(spi, server)


lazy val spi =
project
.in(file("spi"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-airframe/grpc/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-airframe/grpc/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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)
}
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-airframe/js-client/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import myapp.spi._

object Main {

val jsClient = new ServiceJSClient()
val jsClient = new ServiceJSClient()
val rpcClient = new ServiceJSClientRx()

import MyRPC._
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-airframe/js-client/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/sbt-airframe/openapi/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-airframe/openapi/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit 7eccabb

Please sign in to comment.