As someone who works with legacy projects, usually I works with mavenLocal()
which I saved at .m2
cache during development.
here's the example in linux ubuntu
create cache using this path
/home/<user>/.m2/repository/com/google/android/exoplayer/exoplayer-core/<exoplayer_version>/<exoplayer_version>.pom