google / j2cl

Java to Closure JavaScript transpiler
Apache License 2.0
1.22k stars 143 forks source link

Support `rules_jvm_external` or `j2cl_maven_import_external` private registry #212

Open tamascsaba opened 10 months ago

tamascsaba commented 10 months ago

Hi 👋 I would like to use j2cl with private maven registry. I checked j2cl_maven_import_external function, but it is only support public repository download: https://github.com/google/j2cl/blob/54deeb5ea6913c2c6d256a7ea80d3fff4d614d44/build_defs/internal_do_not_use/j2cl_repo.bzl#L36 It would be great add credential support to download method: https://github.com/bazelbuild/bazel/blob/290fc80a5aae9dea06de52deed7098a5b8443f26/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloader.java#L77

Maybe an other solution when it would be possible integrate with rules_jvm_external rule, which support private registries. https://github.com/bazelbuild/rules_jvm_external#features

Thank you very much for the response.

gkdn commented 10 months ago

It would be good idea to just wrap around rules_jvm_external.

My comment here: https://github.com/google/j2cl/blob/54deeb5ea6913c2c6d256a7ea80d3fff4d614d44/build_defs/internal_do_not_use/j2cl_repo.bzl#L9 might not be accurate. We do support source jars with j2cl_library so it might be possible today. Also it could be that I meant something else there, who knows :) Anyway would you like to give it a shot?