Skip to content

Commit

Permalink
Merge pull request #109 from xuwei-k/slash-syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n authored Oct 15, 2024
2 parents 2304544 + aaf6a94 commit 03ee03a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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" ::
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions project/Transform.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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."
)
Expand Down Expand Up @@ -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)
}
},
Expand All @@ -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)
}
},
Expand Down
4 changes: 2 additions & 2 deletions project/Util.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit 03ee03a

Please sign in to comment.