Sorts files in stream by dependencies using @requires annotation.