Merge pull request #7470 from Friendseeker/packageSrc-managed-source

Include `managedSources` in `packageSrc`
This commit is contained in:
eugene yokota 2024-01-02 00:41:28 -05:00 committed by GitHub
commit cfe0fc8e2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1719,11 +1719,11 @@ object Defaults extends BuildCommon {
// drop base directories, since there are no valid mappings for these
def sourceMappings: Initialize[Task[Seq[(File, String)]]] =
Def.task {
val sdirs = unmanagedSourceDirectories.value
val sdirs = unmanagedSourceDirectories.value ++ managedSourceDirectories.value
val base = baseDirectory.value
val relative = (f: File) => relativeTo(sdirs)(f).orElse(relativeTo(base)(f)).orElse(flat(f))
val exclude = Set(sdirs, base)
unmanagedSources.value.flatMap {
(unmanagedSources.value ++ managedSources.value).flatMap {
case s if !exclude(s) => relative(s).map(s -> _)
case _ => None
}