Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ class AffectedModuleDetectorImpl constructor(
findDependentProjects()
}

private var changedFiles: MutableSet<String> = mutableSetOf()

private var unknownFiles: MutableSet<String> = mutableSetOf()

override fun shouldInclude(project: Project): Boolean {
Expand Down Expand Up @@ -400,8 +402,10 @@ class AffectedModuleDetectorImpl constructor(
* Also populates the unknownFiles var which is used in findAffectedProjects
*/
private fun findChangedProjects(): Set<Project> {
val changedFiles = git.findChangedFiles(
includeUncommitted = true
changedFiles.addAll(
git.findChangedFiles(
includeUncommitted = true
)
)

val changedProjects = mutableSetOf<Project>()
Expand Down Expand Up @@ -462,7 +466,7 @@ class AffectedModuleDetectorImpl constructor(
if (changedProjects.isEmpty() && unknownFiles.isEmpty()) {
buildAll = true
}
unknownFiles.forEach {
changedFiles.forEach {
if (affectsAllModules(it)) {
buildAll = true
}
Expand Down