We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 020e601 commit cf6eee4Copy full SHA for cf6eee4
modules/build/src/main/scala/scala/build/CrossSources.scala
@@ -190,9 +190,9 @@ object CrossSources {
190
191
val flattenedInputs = inputs.flattened()
192
val allExclude = { // supports only one exclude directive in one source file, which should be the project file.
193
- val projectScalaFileOpt = flattenedInputs.collectFirst {
+ val projectScalaFileOpt = flattenedInputs.collect {
194
case f: ProjectScalaFile => f
195
- }
+ }.sortBy(_.subPath.segments.size).headOption
196
val excludeFromProjectFile =
197
value(preprocessSources(projectScalaFileOpt.toSeq))
198
.flatMap(_.options).flatMap(_.internal.exclude)
0 commit comments