diff --git a/build.sbt b/build.sbt index fca19c8..c54baad 100644 --- a/build.sbt +++ b/build.sbt @@ -54,6 +54,7 @@ lazy val sbtPlugin = project Seq("-Xmx1024M", "-Dplugin.version=" + version.value), scriptedBufferLog := false, ) + .disablePlugins(MimaPlugin) .enablePlugins(SbtPlugin) lazy val root = project diff --git a/sbtPlugin/src/main/scala/org/polyvariant/smithytraitcodegen/SmithyTraitCodegen.scala b/sbtPlugin/src/main/scala/org/polyvariant/smithytraitcodegen/SmithyTraitCodegen.scala index 95caae1..46d717b 100644 --- a/sbtPlugin/src/main/scala/org/polyvariant/smithytraitcodegen/SmithyTraitCodegen.scala +++ b/sbtPlugin/src/main/scala/org/polyvariant/smithytraitcodegen/SmithyTraitCodegen.scala @@ -46,41 +46,18 @@ object SmithyTraitCodegen { object Args { - // format: off - private type ArgsDeconstructed = String :*: String :*: os.Path :*: PathRef :*: List[PathRef] :*: List[String] :*: LNil - // format: on - private implicit val pathFormat: JsonFormat[os.Path] = BasicJsonProtocol .projectFormat[os.Path, File](p => p.toIO, file => os.Path(file)) - implicit val argsIso = LList.iso[Args, ArgsDeconstructed]( - { - args: Args => ("javaPackage", args.javaPackage) :*: - ("smithyNamespace", args.smithyNamespace) :*: - ("targetDir", args.targetDir) :*: - ("smithySourcesDir", args.smithySourcesDir) :*: - ("dependencies", args.dependencies) :*: - ("externalProviders", args.externalProviders) :*: - LNil - }, - { - case (_, javaPackage) :*: - (_, smithyNamespace) :*: - (_, targetDir) :*: - (_, smithySourcesDir) :*: - (_, dependencies) :*: - (_, externalProviders) :*: - LNil => - Args( - javaPackage = javaPackage, - smithyNamespace = smithyNamespace, - targetDir = targetDir, - smithySourcesDir = smithySourcesDir, - dependencies = dependencies, - externalProviders = externalProviders, - ) - }, - ) + implicit val argsFmt: JsonFormat[Args] = + caseClass(Args.apply _, Args.unapply _)( + "javaPackage", + "smithyNamespace", + "targetDir", + "smithySourcesDir", + "dependencies", + "externalProviders", + ) }