This commit is contained in:
kenji yoshida 2026-07-19 05:26:00 +00:00 committed by GitHub
commit dca834c801
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 1 deletions

View File

@ -286,11 +286,12 @@ object Defaults extends BuildCommon with DefExtra {
csrCacheDirectory := LMCoursier.defaultCacheLocation,
csrSameVersions :== Nil,
stagingDirectory := (ThisBuild / baseDirectory).value / "target" / "sona-staging",
sonaBundleDirectory := (ThisBuild / baseDirectory).value / "target" / "sona-bundle",
localStaging := Some(Resolver.file("local-staging", stagingDirectory.value)),
sonaBundle := Publishing
.makeBundle(
stagingDirectory.value.toPath(),
((ThisBuild / baseDirectory).value / "target" / "sona-bundle" / "bundle.zip").toPath()
(sonaBundleDirectory.value / "bundle.zip").toPath()
)
.toFile(),
sonaBundle / aggregate :== false,

View File

@ -677,6 +677,8 @@ object Keys {
@transient
val stagingDirectory = settingKey[File]("Local staging directory for Sonatype publishing").withRank(CSetting)
@transient
private[sbt] val sonaBundleDirectory = settingKey[File]("Local bundle directory for Sonatype publishing").withRank(DSetting)
@transient
val sonaBundle = taskKey[File]("Local bundle for Sonatype publishing").withRank(DTask)
val localStaging = settingKey[Option[Resolver]]("Local staging resolver for Sonatype publishing").withRank(CSetting)
val sonaDeploymentName = settingKey[String]("The name used for deployment").withRank(DSetting)

View File

@ -226,6 +226,9 @@ private[sbt] object Clean {
case d: DiskActionCacheStore => d.clear()
case _ => ()
IO.delete(outputDirectory.toFile())
val extracted = Project.extract(s)
IO.delete(extracted.get(Keys.stagingDirectory))
IO.delete(extracted.get(Keys.sonaBundleDirectory))
IO.delete(
s.configuration
.provider()