Skip to content

Commit 627862b

Browse files
committed
Update the types
1 parent be1a81c commit 627862b

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

src/main/scala-2.12/PluginCompat.scala

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import sbt.util.Tracked.{ inputChanged, lastOutput }
1010
import xsbti.FileConverter
1111

1212
private[sbtassembly] object PluginCompat {
13+
type FileRef = java.io.File
1314
type Out = java.io.File
1415
type MainClass = sbt.Package.MainClass
1516

src/main/scala-3/PluginCompat.scala

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import java.nio.file.{ Path => NioPath }
55
import java.util.jar.{ Manifest => JManifest }
66
import sbt.*
77
import sbt.librarymanagement.ModuleID
8-
import xsbti.{ FileConverter, HashedVirtualFileRef }
8+
import xsbti.{ FileConverter, HashedVirtualFileRef, VirtualFile }
99

1010
object PluginCompat:
11-
type Out = HashedVirtualFileRef
11+
type FileRef = HashedVirtualFileRef
12+
type Out = VirtualFile
1213
type JarManifest = PackageOption.JarManifest
1314
type MainClass = PackageOption.MainClass
1415
type ManifestAttributes = PackageOption.ManifestAttributes
@@ -24,7 +25,7 @@ object PluginCompat:
2425
conv.toPath(a.data)
2526
inline def toFile(a: Attributed[HashedVirtualFileRef])(implicit conv: FileConverter): File =
2627
toNioPath(a).toFile()
27-
def toOutput(x: File)(implicit conv: FileConverter): HashedVirtualFileRef =
28+
def toOutput(x: File)(implicit conv: FileConverter): VirtualFile =
2829
conv.toVirtualFile(x.toPath())
2930
def toNioPaths(cp: Seq[Attributed[HashedVirtualFileRef]])(implicit conv: FileConverter): Vector[NioPath] =
3031
cp.map(toNioPath).toVector

src/main/scala/sbtassembly/Assembly.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ object Assembly {
170170
val jarName: String = s"$name${if (version.nonEmpty) "-" else ""}$version.jar"
171171
}
172172

173-
def assemblyTask(key: TaskKey[PluginCompat.Out]): Initialize[Task[PluginCompat.Out]] = Def.task {
173+
def assemblyTask(key: TaskKey[PluginCompat.FileRef]): Initialize[Task[PluginCompat.Out]] = Def.task {
174174
val t = (key / test).value
175175
val s = (key / streams).value
176176
val conv = fileConverter.value

src/main/scala/sbtassembly/AssemblyKeys.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import sbt.Keys.*
55
import sbt.*
66

77
trait AssemblyKeys {
8-
lazy val assembly = taskKey[PluginCompat.Out]("Builds a deployable über JAR")
8+
lazy val assembly = taskKey[PluginCompat.FileRef]("Builds a deployable über JAR")
99
lazy val assembleArtifact = settingKey[Boolean]("Enables (true) or disables (false) assembling an artifact")
1010
lazy val assemblyOption = taskKey[AssemblyOption]("Configuration for making a deployable über JAR")
11-
lazy val assemblyPackageScala = taskKey[PluginCompat.Out]("Produces the Scala artifact")
12-
lazy val assemblyPackageDependency = taskKey[PluginCompat.Out]("Produces the dependency artifact")
11+
lazy val assemblyPackageScala = taskKey[PluginCompat.FileRef]("Produces the Scala artifact")
12+
lazy val assemblyPackageDependency = taskKey[PluginCompat.FileRef]("Produces the dependency artifact")
1313
lazy val assemblyJarName = taskKey[String]("name of the über jar")
1414
lazy val assemblyDefaultJarName = taskKey[String]("default name of the über jar")
1515
lazy val assemblyOutputPath = taskKey[File]("output path of the über jar")

0 commit comments

Comments
 (0)