We introduce the radiative transfer code Sweep for the cosmological simulation suite Arepo. Sweep is a discrete ordinates method in which radiation transport is carried out by a transport sweep across the entire computational grid. Since Arepo is based on an adaptive, unstructured grid, the dependency graph induced by the sweep dependencies of the grid cells is non-trivial. In order to solve the topological sorting problem in a distributed manner, we employ a task-based-parallelism approach. The main advantage of the sweep method is that the computational cost scales only with the size of the grid, and is independent of the number of sources or the distribution of sources in the computational domain, which is an advantage for radiative transfer in cosmological simulations, where there are large numbers of sparsely distributed sources. We successfully apply the code to a number of physical tests such as the expansion of HII regions, the formation of shadows behind dense objects, the scattering of light, as well as its behavior in the presence of periodic boundary conditions. In addition, we measure its computational performance with a focus on highly parallel, large-scale simulations.