code: public void checkDependencyCycles(List<String> errors) {
  		if (!dependenciesResolved) {
  			throw new Error("Call resolveDependencies() first");
  		}
  
  		SimpleDirectedGraph<ModuleModel, Edge> g = buildModuleDependencyGraph();
  
  		CycleDetector<ModuleModel, Edge> detector = new CycleDetector<>(g);
  		Set<ModuleModel> cycleModules = detector.findCycles();
  
  		if (!cycleModules.isEmpty()) {
  			errors.add("Found cycle in module dependency graph. Involved modules: "
  					+ cycleModules);
  		}
  	}
docs: Check if there are any cycles in the dependencies of the modules.