Remove conscriptConfigs task, not used and needed anymore

This commit is contained in:
Matthias Kurz 2023-08-11 21:56:46 +02:00
parent e3b7870b2d
commit bd8b11632c
No known key found for this signature in database
GPG Key ID: 0B4AAA92F1117EF5
2 changed files with 0 additions and 22 deletions

View File

@ -206,7 +206,6 @@ lazy val sbtRoot: Project = (project in file("."))
scalacOptions += "-Ymacro-expand:none", // for both sxr and doc
Util.publishPomSettings,
otherRootSettings,
Transform.conscriptSettings(bundledLauncherProj),
publish := {},
publishLocal := {},
publish / skip := true,

View File

@ -2,27 +2,6 @@ import sbt._
import sbt.Keys._
object Transform {
private val conscriptConfigs = taskKey[Unit]("")
def conscriptSettings(launch: Reference) = Seq(
conscriptConfigs := {
val sourceFile = (launch / Compile / managedResources).value
.find(_.getName == "sbt.boot.properties")
.getOrElse(sys.error("No managed boot.properties file."))
val source = IO.readLines(sourceFile)
val conscriptBase = (Compile / sourceDirectory).value / "conscript"
IO.delete(conscriptBase)
val pairs = Seq(
"sbt.xMain" -> "xsbt",
"sbt.ScriptMain" -> "scalas",
"sbt.ConsoleMain" -> "screpl",
)
for ((main, dir) <- pairs) {
val lines = source.map(l => if (l.trim.startsWith("class:")) s" class: $main" else l)
IO.writeLines(conscriptBase / dir / "launchconfig", lines)
}
},
)
def configSettings = Seq(
resourceGenerators += Def.task {