bazeltools / bazel-deps

Generate bazel dependencies for maven artifacts
MIT License
249 stars 121 forks source link

Migrate to using only java_import #311

Open johnynek opened 2 years ago

johnynek commented 2 years ago

currently we do a repo rule that downloads the file, then use java_import to wrap that, then use java_library to build the dependency graph.

This is because in the past, java_import didn't allow exports or runtime_deps so we couldn't set up the dependency graph.

That's no longer the case, so we could just directly use java_import and scala_import and reduce the number of targets and also have a side benefit of avoiding producing the empty jars that are produced by java_library.

johnynek commented 2 years ago

scala_import seems to be doing the right thing, btw. So, this is only for java libraries.