From aaf6a9419cf4dcf90ce54a00898aa8cd2961d4c1 Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Tue, 15 Oct 2024 07:32:35 +0900 Subject: [PATCH] fix warnings. use slash syntax --- build.sbt | 12 ++++++------ project/Transform.scala | 12 ++++++------ project/Util.scala | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build.sbt b/build.sbt index 897fc07..00c90ee 100644 --- a/build.sbt +++ b/build.sbt @@ -29,8 +29,8 @@ lazy val root = (project in file(".")) .settings(nocomma { mimaPreviousArtifacts := Set.empty Compile / packageBin := (launchSub / Proguard / proguard).value.head - packageSrc in Compile := (packageSrc in Compile in launchSub).value - packageDoc in Compile := (packageDoc in Compile in launchSub).value + Compile / packageSrc := (launchSub / Compile / packageSrc).value + Compile / packageDoc := (launchSub / Compile / packageDoc).value commands += Command.command("release") { state => "clean" :: "test" :: @@ -50,7 +50,7 @@ lazy val root = (project in file(".")) // the launcher is published with metadata so that the scripted plugin can pull it in // being proguarded, it shouldn't ever be on a classpath with other jars, however def proguardedLauncherSettings = Seq( - publishArtifact in packageSrc := false, + packageSrc / publishArtifact := false, moduleName := "sbt-launch", autoScalaLibrary := false, description := "sbt application launcher" @@ -71,12 +71,12 @@ lazy val launchInterfaceSub = (project in file("launcher-interface")) .settings(javaOnly) .settings(nocomma { name := "Launcher Interface" - resourceGenerators in Compile += Def.task { + Compile / resourceGenerators += Def.task { generateVersionFile("sbt.launcher.version.properties")( version.value, resourceManaged.value, streams.value, - (compile in Compile).value + (Compile / compile).value ) }.taskValue description := "Interfaces for launching projects with the sbt launcher" @@ -112,7 +112,7 @@ lazy val launchSub = (project in file("launcher-implementation")) Test / compile := { val ignore = (testSamples / publishLocal).value val ignore2 = (launchInterfaceSub / publishLocal).value - (compile in Test).value + (Test / compile).value } Proguard / proguardOptions ++= Seq( "-keep,allowshrinking class * { *; }", // no obfuscation diff --git a/project/Transform.scala b/project/Transform.scala index 05d240a..5f6cc2c 100644 --- a/project/Transform.scala +++ b/project/Transform.scala @@ -19,8 +19,8 @@ object Transform { def conscriptSettings(launch: Reference) = Seq( conscriptConfigs := { - val res = (managedResources in launch in Compile).value - val src = (sourceDirectory in Compile).value + val res = (launch / Compile / managedResources).value + val src = (Compile / sourceDirectory).value val source = res.filter(_.getName == "sbt.boot.properties").headOption getOrElse sys.error( "No managed boot.properties file." ) @@ -54,9 +54,9 @@ object Transform { inputSourceDirectory := sourceDirectory.value / "input_sources", inputSourceDirectories := Seq(inputSourceDirectory.value), inputSources := (inputSourceDirectories.value ** (-DirectoryFilter)).get, - fileMappings in transformSources := transformSourceMappings.value, + transformSources / fileMappings := transformSourceMappings.value, transformSources := { - (fileMappings in transformSources).value.map { + (transformSources / fileMappings).value.map { case (in, out) => transform(in, out, sourceProperties.value) } }, @@ -83,9 +83,9 @@ object Transform { inputResourceDirectory := sourceDirectory.value / "input_resources", inputResourceDirectories := Seq(inputResourceDirectory.value), inputResources := (inputResourceDirectories.value ** (-DirectoryFilter)).get, - fileMappings in transformResources := transformResourceMappings.value, + transformResources / fileMappings := transformResourceMappings.value, transformResources := { - (fileMappings in transformResources).value.map { + (transformResources / fileMappings).value.map { case (in, out) => transform(in, out, resourceProperties.value) } }, diff --git a/project/Util.scala b/project/Util.scala index ec73ea1..89a59ff 100644 --- a/project/Util.scala +++ b/project/Util.scala @@ -91,9 +91,9 @@ object Licensed { def settings: Seq[Setting[_]] = Seq( notice := baseDirectory.value / "NOTICE", - unmanagedResources in Compile ++= (notice.value +: extractLicenses.value), + Compile / unmanagedResources ++= (notice.value +: extractLicenses.value), extractLicenses := extractLicenses0( - (baseDirectory in ThisBuild).value, + (ThisBuild / baseDirectory).value, notice.value, streams.value )