Skip to content

Commit

Permalink
Remove unused sbt-assembly plugin (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
neko-kai authored Nov 21, 2023
1 parent 2bd0945 commit 4734167
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 63 deletions.
37 changes: 2 additions & 35 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}

enablePlugins(SbtgenVerificationPlugin)

disablePlugins(AssemblyPlugin)

ThisBuild / libraryDependencySchemes += "io.circe" %% "circe-core" % VersionScheme.Always

ThisBuild / libraryDependencySchemes += "io.circe" %% "circe-core_sjs1" % VersionScheme.Always
Expand Down Expand Up @@ -161,9 +159,7 @@ lazy val `idealingua-v1-model` = crossProject(JVMPlatform, JSPlatform).crossType
)
.enablePlugins(IzumiPlugin)
lazy val `idealingua-v1-modelJVM` = `idealingua-v1-model`.jvm
.disablePlugins(AssemblyPlugin)
lazy val `idealingua-v1-modelJS` = `idealingua-v1-model`.js
.disablePlugins(AssemblyPlugin)

lazy val `idealingua-v1-core` = crossProject(JVMPlatform, JSPlatform).crossType(CrossType.Pure).in(file("idealingua-v1/idealingua-v1-core"))
.dependsOn(
Expand Down Expand Up @@ -310,9 +306,7 @@ lazy val `idealingua-v1-core` = crossProject(JVMPlatform, JSPlatform).crossType(
)
.enablePlugins(IzumiPlugin)
lazy val `idealingua-v1-coreJVM` = `idealingua-v1-core`.jvm
.disablePlugins(AssemblyPlugin)
lazy val `idealingua-v1-coreJS` = `idealingua-v1-core`.js
.disablePlugins(AssemblyPlugin)

lazy val `idealingua-v1-runtime-rpc-scala` = crossProject(JVMPlatform, JSPlatform).crossType(CrossType.Pure).in(file("idealingua-v1/idealingua-v1-runtime-rpc-scala"))
.settings(
Expand Down Expand Up @@ -476,15 +470,13 @@ lazy val `idealingua-v1-runtime-rpc-scala` = crossProject(JVMPlatform, JSPlatfor
)
.enablePlugins(IzumiPlugin)
lazy val `idealingua-v1-runtime-rpc-scalaJVM` = `idealingua-v1-runtime-rpc-scala`.jvm
.disablePlugins(AssemblyPlugin)
lazy val `idealingua-v1-runtime-rpc-scalaJS` = `idealingua-v1-runtime-rpc-scala`.js
.settings(
libraryDependencies ++= Seq(
"org.typelevel" %% "jawn-parser" % Izumi.Deps.fundamentals_json_circeJVM.org_typelevel_jawn_parser_version,
"io.github.cquiroz" %%% "scala-java-time" % V.scala_java_time % Test
)
)
.disablePlugins(AssemblyPlugin)

lazy val `idealingua-v1-runtime-rpc-http4s` = project.in(file("idealingua-v1/idealingua-v1-runtime-rpc-http4s"))
.dependsOn(
Expand Down Expand Up @@ -626,7 +618,6 @@ lazy val `idealingua-v1-runtime-rpc-http4s` = project.in(file("idealingua-v1/ide
scalacOptions -= "-Wconf:any:error"
)
.enablePlugins(IzumiPlugin)
.disablePlugins(AssemblyPlugin)

lazy val `idealingua-v1-transpilers` = crossProject(JVMPlatform, JSPlatform).crossType(CrossType.Pure).in(file("idealingua-v1/idealingua-v1-transpilers"))
.dependsOn(
Expand Down Expand Up @@ -794,14 +785,12 @@ lazy val `idealingua-v1-transpilersJVM` = `idealingua-v1-transpilers`.jvm
`idealingua-v1-runtime-rpc-go` % "test->compile",
`idealingua-v1-runtime-rpc-csharp` % "test->compile"
)
.disablePlugins(AssemblyPlugin)
lazy val `idealingua-v1-transpilersJS` = `idealingua-v1-transpilers`.js
.settings(
libraryDependencies ++= Seq(
"org.typelevel" %% "jawn-parser" % Izumi.Deps.fundamentals_json_circeJVM.org_typelevel_jawn_parser_version
)
)
.disablePlugins(AssemblyPlugin)

lazy val `idealingua-v1-test-defs` = project.in(file("idealingua-v1/idealingua-v1-test-defs"))
.dependsOn(
Expand Down Expand Up @@ -938,7 +927,6 @@ lazy val `idealingua-v1-test-defs` = project.in(file("idealingua-v1/idealingua-v
scalacOptions -= "-Wconf:any:error"
)
.enablePlugins(IzumiPlugin)
.disablePlugins(AssemblyPlugin)

lazy val `idealingua-v1-runtime-rpc-typescript` = project.in(file("idealingua-v1/idealingua-v1-runtime-rpc-typescript"))
.settings(
Expand Down Expand Up @@ -1069,7 +1057,6 @@ lazy val `idealingua-v1-runtime-rpc-typescript` = project.in(file("idealingua-v1
scalacOptions -= "-Wconf:any:error"
)
.enablePlugins(IzumiPlugin)
.disablePlugins(AssemblyPlugin)

lazy val `idealingua-v1-runtime-rpc-go` = project.in(file("idealingua-v1/idealingua-v1-runtime-rpc-go"))
.settings(
Expand Down Expand Up @@ -1200,7 +1187,6 @@ lazy val `idealingua-v1-runtime-rpc-go` = project.in(file("idealingua-v1/idealin
scalacOptions -= "-Wconf:any:error"
)
.enablePlugins(IzumiPlugin)
.disablePlugins(AssemblyPlugin)

lazy val `idealingua-v1-runtime-rpc-csharp` = project.in(file("idealingua-v1/idealingua-v1-runtime-rpc-csharp"))
.settings(
Expand Down Expand Up @@ -1331,7 +1317,6 @@ lazy val `idealingua-v1-runtime-rpc-csharp` = project.in(file("idealingua-v1/ide
scalacOptions -= "-Wconf:any:error"
)
.enablePlugins(IzumiPlugin)
.disablePlugins(AssemblyPlugin)

lazy val `idealingua-v1-compiler` = project.in(file("idealingua-v1/idealingua-v1-compiler"))
.dependsOn(
Expand Down Expand Up @@ -1467,29 +1452,16 @@ lazy val `idealingua-v1-compiler` = project.in(file("idealingua-v1/idealingua-v1
)
case (_, _) => Seq.empty
} },
scalacOptions -= "-Wconf:any:error",
assembly / mainClass := Some("izumi.idealingua.compiler.CommandlineIDLCompiler"),
assembly / assemblyMergeStrategy := {
case path if path.contains("scala/annotation/nowarn") =>
MergeStrategy.last
case p =>
(assembly / assemblyMergeStrategy).value(p)
},
Compile / assembly / artifact := {
val art = (Compile / assembly / artifact).value
art.withClassifier(Some("assembly"))
},
addArtifact(Compile / assembly / artifact, assembly)
scalacOptions -= "-Wconf:any:error"
)
.enablePlugins(AssemblyPlugin, IzumiPlugin)
.enablePlugins(IzumiPlugin)

lazy val `idealingua` = (project in file(".agg/idealingua-v1-idealingua"))
.settings(
publish / skip := true,
crossScalaVersions := Nil
)
.enablePlugins(IzumiPlugin)
.disablePlugins(AssemblyPlugin)
.aggregate(
`idealingua-v1-modelJVM`,
`idealingua-v1-modelJS`,
Expand All @@ -1512,7 +1484,6 @@ lazy val `idealingua-jvm` = (project in file(".agg/idealingua-v1-idealingua-jvm"
publish / skip := true,
crossScalaVersions := Nil
)
.disablePlugins(AssemblyPlugin)
.aggregate(
`idealingua-v1-modelJVM`,
`idealingua-v1-coreJVM`,
Expand All @@ -1531,7 +1502,6 @@ lazy val `idealingua-js` = (project in file(".agg/idealingua-v1-idealingua-js"))
publish / skip := true,
crossScalaVersions := Nil
)
.disablePlugins(AssemblyPlugin)
.aggregate(
`idealingua-v1-modelJS`,
`idealingua-v1-coreJS`,
Expand All @@ -1544,7 +1514,6 @@ lazy val `idealingua-v1-jvm` = (project in file(".agg/.agg-jvm"))
publish / skip := true,
crossScalaVersions := Nil
)
.disablePlugins(AssemblyPlugin)
.aggregate(
`idealingua-jvm`
)
Expand All @@ -1554,7 +1523,6 @@ lazy val `idealingua-v1-js` = (project in file(".agg/.agg-js"))
publish / skip := true,
crossScalaVersions := Nil
)
.disablePlugins(AssemblyPlugin)
.aggregate(
`idealingua-js`
)
Expand Down Expand Up @@ -1619,7 +1587,6 @@ lazy val `idealingua-v1` = (project in file("."))
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
)
.enablePlugins(IzumiPlugin)
.disablePlugins(AssemblyPlugin)
.aggregate(
`idealingua`
)
26 changes: 1 addition & 25 deletions project/Deps.sc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ object Idealingua {
val sbt_unidoc = Version.VExpr("PV.sbt_unidoc")
val sbt_scoverage = Version.VExpr("PV.sbt_scoverage")
val sbt_pgp = Version.VExpr("PV.sbt_pgp")
val sbt_assembly = Version.VExpr("PV.sbt_assembly")

val scala_js_version = Version.VExpr("PV.scala_js_version")
val crossproject_version = Version.VExpr("PV.crossproject_version")
Expand Down Expand Up @@ -184,14 +183,10 @@ object Idealingua {
final val jvm3 = Seq(jvmPlatform3)
}

final val assemblyPluginJvm = Plugin("AssemblyPlugin", Platform.Jvm)
final val assemblyPluginJs = Plugin("AssemblyPlugin", Platform.Js)

object Projects {

final val plugins = Plugins(
Seq(Plugin("IzumiPlugin")),
Seq(assemblyPluginJs, assemblyPluginJvm),
)

implicit class VersionOptionExt(version: Option[Version]) {
Expand Down Expand Up @@ -219,7 +214,6 @@ object Idealingua {
final val id = ArtifactId("idealingua-v1")
final val plugins = Plugins(
enabled = Seq(Plugin("SbtgenVerificationPlugin")),
disabled = Seq(Plugin("AssemblyPlugin")),
)
final val settings = Seq(
"libraryDependencySchemes" in SettingScope.Build += s""""io.circe" %% "circe-core" % VersionScheme.Always""".raw,
Expand Down Expand Up @@ -408,23 +402,7 @@ object Idealingua {
Projects.idealingua.testDefs,
).map(_ in Scope.Compile.all),
platforms = Targets.jvm2,
plugins = Plugins(Seq(assemblyPluginJvm)),
settings = Seq(
"mainClass" in SettingScope.Raw("assembly") := """Some("izumi.idealingua.compiler.CommandlineIDLCompiler")""".raw,
"assemblyMergeStrategy" in SettingScope.Raw("assembly") :=
"""{
| case path if path.contains("scala/annotation/nowarn") =>
| MergeStrategy.last
| case p =>
| (assembly / assemblyMergeStrategy).value(p)
|}""".stripMargin.raw,
"artifact" in SettingScope.Raw("Compile / assembly") :=
"""{
| val art = (Compile / assembly / artifact).value
| art.withClassifier(Some("assembly"))
|}""".stripMargin.raw,
SettingDef.RawSettingDef("addArtifact(Compile / assembly / artifact, assembly)"),
),
settings = Seq.empty,
),
),
pathPrefix = Projects.idealingua.basePath,
Expand All @@ -448,9 +426,7 @@ object Idealingua {
),
rootPlugins = Projects.root.plugins,
globalPlugins = Projects.plugins,
pluginConflictRules = Map(assemblyPluginJvm.name -> true),
appendPlugins = Defaults.SbtGenPlugins ++ Seq(
SbtPlugin("com.eed3si9n", "sbt-assembly", PV.sbt_assembly),
SbtPlugin("com.github.sbt", "sbt-pgp", PV.sbt_pgp),
SbtPlugin("org.scoverage", "sbt-scoverage", PV.sbt_scoverage),
SbtPlugin("io.7mind.izumi", "sbt-izumi-deps", PV.izumi),
Expand Down
2 changes: 0 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")

addSbtPlugin("io.7mind.izumi.sbt" % "sbt-izumi" % "0.0.99")

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % PV.sbt_assembly)

addSbtPlugin("com.github.sbt" % "sbt-pgp" % PV.sbt_pgp)

addSbtPlugin("org.scoverage" % "sbt-scoverage" % PV.sbt_scoverage)
Expand Down
1 change: 0 additions & 1 deletion project/project/PluginVersions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ object PV {

val sbt_scoverage = "2.0.9"
val sbt_pgp = "2.2.1"
val sbt_assembly = "1.1.1"
}

0 comments on commit 4734167

Please sign in to comment.