Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use new slash syntax instead of deprecated in #346

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions sbt-conscript/src/main/scala/ConscriptPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ object ConscriptPlugin extends AutoPlugin {
List(
csSbtLauncherVersion := ConscriptBuildInfo.sbtLauncherVersion,
libraryDependencies += "org.scala-sbt" % "launcher-interface" % csSbtLauncherVersion.value % "provided",
sourceDirectory in csRun := { (sourceDirectory in Compile).value / conscriptStr },
target in csRun := { target.value / conscriptStr },
csBoot := { (target in csRun).value / "boot" },
csRun / sourceDirectory := { (Compile / sourceDirectory).value / conscriptStr },
csRun / target := { target.value / conscriptStr },
csBoot := { (csRun / target).value / "boot" },
csWrite := csWriteTask.value,
csRun := csRunTask.evaluated,
(aggregate in csRun) := false
(csRun / aggregate) := false
)

private def configs(path: File) = (path ** "launchconfig").get
private def configName(path: File) = file(path.getParent).getName
lazy val csWriteTask = Def.task {
val base = (sourceDirectory in csRun).value
val output = (target in csRun).value
val base = (csRun / sourceDirectory).value
val output = (csRun / target).value
val boot = csBoot.value
IO.delete(output)
IO.copyDirectory(base, output)
Expand All @@ -52,7 +52,7 @@ object ConscriptPlugin extends AutoPlugin {
val args = Def.spaceDelimited().parsed
val x = csWrite.value
val y = publishLocal.value
val output = (target in csRun).value
val output = (csRun / target).value
val config = args.headOption.map { name =>
configs(output).find {
p => configName(p) == name
Expand Down