Skip to content

Commit b118716

Browse files
committed
Add a bit of additional functionality
1 parent 19ad8a9 commit b118716

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetector.kt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,28 @@ abstract class AffectedModuleDetector(protected val logger: Logger?) {
312312
).hasAffectedProjects()
313313
}
314314

315+
/**
316+
* Returns a set of all affected project paths
317+
*
318+
* Can only be called during the execution phase
319+
*/
320+
fun affectedProjects(project: Project): Set<ProjectPath> {
321+
return getOrThrow(
322+
project
323+
).getAllAffectedProjects()
324+
}
325+
326+
/**
327+
* Returns a set of all changed project paths
328+
*
329+
* Can only be called during the execution phase
330+
*/
331+
fun changedProjects(project: Project): Set<ProjectPath> {
332+
return getOrThrow(
333+
project
334+
).getAllChangedProjects()
335+
}
336+
315337
/**
316338
* Returns true if the project was provided via [MODULES_ARG] or no [MODULES_ARG] was set
317339
*

0 commit comments

Comments
 (0)