From fe64f3e3d3479a4642f873b9215e8fc366850fd0 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Sat, 20 Jan 2024 09:04:46 +1100 Subject: [PATCH] Remove nocomma plugin --- build.sbt | 62 ++++++++++++++++++++++----------------------- project/plugins.sbt | 1 - 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/build.sbt b/build.sbt index d3424fc1..ec32f599 100644 --- a/build.sbt +++ b/build.sbt @@ -35,71 +35,71 @@ lazy val commonSettings = Seq( lazy val root = (project in file(".")) .aggregate(app, integration, scalaxbPlugin) - .settings(nocomma { - name := "scalaxb-root" - scalaVersion := scala212 - publish / skip := true - crossScalaVersions := Nil + .settings( + name := "scalaxb-root", + scalaVersion := scala212, + publish / skip := true, + crossScalaVersions := Nil, commands += Command.command("release") { state => "clean" :: "+app/publishSigned" :: "++2.12.12!;scalaxbPlugin/publishSigned" :: state } - }) + ) lazy val app = (project in file("cli")) .enablePlugins(BuildInfoPlugin) .settings(commonSettings) .settings(codegenSettings) - .settings(nocomma { - name := "scalaxb" - crossScalaVersions := Seq(scala3, scala213, scala212) - scalaVersion := scala212 - resolvers += sbtResolver.value - libraryDependencies ++= appDependencies(scalaVersion.value) + .settings( + name := "scalaxb", + crossScalaVersions := Seq(scala3, scala213, scala212), + scalaVersion := scala212, + resolvers += sbtResolver.value, + libraryDependencies ++= appDependencies(scalaVersion.value), scalacOptions := { val prev = scalacOptions.value if (scalaVersion.value == scala212) { prev :+ "-Xfatal-warnings" } else prev - } - assembly / mainClass := Some("scalaxb.compiler.Main") - assembly / assemblyOption := (assembly / assemblyOption).value.withPrependShellScript(Some(sbtassembly.AssemblyPlugin.defaultShellScript)) + }, + assembly / mainClass := Some("scalaxb.compiler.Main"), + assembly / assemblyOption := (assembly / assemblyOption).value.withPrependShellScript(Some(sbtassembly.AssemblyPlugin.defaultShellScript)), assembly / assemblyOutputPath := file(s"./${name.value}-${version.value}") - }) + ) lazy val integration = (project in file("integration")) .dependsOn(app) .settings(commonSettings) - .settings(nocomma { - crossScalaVersions := Seq(scala212, scala213) - scalaVersion := scala212 - publishArtifact := false - libraryDependencies ++= integrationDependencies(scalaVersion.value) + .settings( + crossScalaVersions := Seq(scala212, scala213), + scalaVersion := scala212, + publishArtifact := false, + libraryDependencies ++= integrationDependencies(scalaVersion.value), // fork in test := true, // javaOptions in test ++= Seq("-Xmx2G", "-XX:MaxPermSize=512M") - Test / parallelExecution := false - Test / testOptions += Tests.Argument("sequential") + Test / parallelExecution := false, + Test / testOptions += Tests.Argument("sequential"), publish / skip := true - }) + ) lazy val scalaxbPlugin = (project in file("sbt-scalaxb")) .enablePlugins(SbtPlugin) .dependsOn(app) .settings(commonSettings) - .settings(nocomma { - name := "sbt-scalaxb" - description := """sbt plugin to run scalaxb""" + .settings( + name := "sbt-scalaxb", + description := """sbt plugin to run scalaxb""", pluginCrossBuild / sbtVersion := { scalaBinaryVersion.value match { case "2.12" => "1.5.8" // set minimum sbt version } - } + }, scriptedLaunchOpts := { scriptedLaunchOpts.value ++ Seq("-Xmx1024M", "-Dplugin.version=" + version.value) - } - scriptedBufferLog := false + }, + scriptedBufferLog := false, scripted := scripted.dependsOn(app / publishLocal).evaluated - }) + ) diff --git a/project/plugins.sbt b/project/plugins.sbt index 712bc37f..d2dac001 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,3 @@ -addSbtPlugin("com.eed3si9n" % "sbt-nocomma" % "0.1.1") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.3") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")