private boolean collectDependentConfigurations ( BuildConfiguration buildConfiguration , BuildConfigurationAudited buildConfigurationAudited , Set < BuildConfigurationAudited > toBuild , Set < BuildConfiguration > visited , boolean checkImplicitDependencies , boolean forceRebuild , boolean temporaryBuild ) { if ( visited . contains ( buildConfiguration ) ) { return toBuild . contains ( buildConfigurationAudited ) ; } visited . add ( buildConfiguration ) ; boolean requiresRebuild = forceRebuild || datastoreAdapter . requiresRebuild ( buildConfigurationAudited , checkImplicitDependencies , temporaryBuild ) ; for ( BuildConfiguration dependency : buildConfiguration . getDependencies ( ) ) { boolean dependencyRequiresRebuild = collectDependentConfigurations ( dependency , datastoreAdapter . getLatestBuildConfigurationAuditedInitializeBCDependencies ( dependency . getId ( ) ) , toBuild , visited , checkImplicitDependencies , forceRebuild , temporaryBuild ) ; requiresRebuild = requiresRebuild || dependencyRequiresRebuild ; } log . debug ( "Configuration {} requires rebuild: " , buildConfiguration . getId ( ) , requiresRebuild ) ; if ( requiresRebuild ) { toBuild . add ( buildConfigurationAudited ) ; } return requiresRebuild ; }
Collects all BuildConfigurationAudited entities that needs to be built .