Use more generic early output file name

This commit is contained in:
friendseeker 2024-10-24 22:00:51 -07:00
parent a46dfc0f4b
commit 5e7fe0b158
No known key found for this signature in database
GPG Key ID: 7DD5039728A27160
1 changed files with 2 additions and 18 deletions

View File

@ -647,7 +647,8 @@ object Defaults extends BuildCommon {
val dir = classDirectory.value val dir = classDirectory.value
converter.toVirtualFile(dir.toPath) converter.toVirtualFile(dir.toPath)
}, },
earlyOutput / artifactPath := configArtifactPathSetting(artifact, "early").value, earlyOutput / artifactPath := crossTarget.value /
(prefix(configuration.value.name) + "early") / "early.jar",
earlyOutput := { earlyOutput := {
val converter = fileConverter.value val converter = fileConverter.value
val jar = (earlyOutput / artifactPath).value val jar = (earlyOutput / artifactPath).value
@ -1813,23 +1814,6 @@ object Defaults extends BuildCommon {
excludes: ScopedTaskable[FileFilter] excludes: ScopedTaskable[FileFilter]
): Initialize[Task[Seq[File]]] = collectFiles(dirs: Taskable[Seq[File]], filter, excludes) ): Initialize[Task[Seq[File]]] = collectFiles(dirs: Taskable[Seq[File]], filter, excludes)
private[sbt] def configArtifactPathSetting(
art: SettingKey[Artifact],
extraPrefix: String
): Initialize[File] =
Def.setting {
val f = artifactName.value
crossTarget.value /
(prefix(configuration.value.name) + extraPrefix) / f(
ScalaVersion(
(artifactName / scalaVersion).value,
(artifactName / scalaBinaryVersion).value
),
projectID.value,
art.value
)
}
private[sbt] def prefixArtifactPathSetting( private[sbt] def prefixArtifactPathSetting(
art: SettingKey[Artifact], art: SettingKey[Artifact],
extraPrefix: String extraPrefix: String