Commit graph

11 commits

Author SHA1 Message Date
Tobias Werth
3907d14b7d Automated Code Change
PiperOrigin-RevId: 941537305
2026-07-02 01:08:39 -07:00
Tobias Werth
71eef33ed0 Automated Code Change
PiperOrigin-RevId: 868019237
2026-02-10 01:55:09 -08:00
Sandy Zhang
4c7b7a971c Restore custom protobuf maven namespaces to avoid polluting main maven namespace for non-dev dependencies as well.
Fixes #20674

PiperOrigin-RevId: 738081837
2025-03-18 11:31:17 -07:00
deannagarcia
27ddb9ce34 Give Kotlin jars an OSGi Manifest (#18812)
Extend our Java OSGi library to have a version that works for Kotlin. Add a `protobuf_versioned_kt_jvm_library` that creates a bundle with the OSGi manifest and call that instead of `kt_jvm_library` for all our kotlin maven release targets.

Closes #18812

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/18812 from deannagarcia:kotlinOSGi 81bab06f61
PiperOrigin-RevId: 686220820
2024-10-15 13:36:19 -07:00
Joe Schafer
44660b306a Rename maven to protobuf_maven in MODULE.bazel (#18641)
The default name for the rules_jvm_external.maven rule is "maven". When not set, it defaults to "maven". For root modules also using rules_jvm_external, the name clash causes a warning:

```
DEBUG: $TMP/external/rules_jvm_external~/private/extensions/maven.bzl:154:14:
The maven repository 'maven' is used in two different bazel modules,
originally in '<my_workspace>' and now in 'protobuf'
```

Summarizing @shs96c in [1]:

> The common maven repo name allows rulesets to contribute to the user's JARs.
> However, this implies that maven is for the end user, not for transitive
> dependencies. If a ruleset needs private dependencies, it should use a custom
> namespace rather than the maven namespace.

Since protobuf is not contributing to user's JARs, we'll use a custom namespace. There's precedent for using a custom namespace for library modules:

- rules_jvm_external uses `rules_jvm_external_deps` instead of `maven`.
- rules_kotlin uses `kotlin_rules_maven` instead of `maven`.

[1]: https://github.com/bazel-contrib/rules_jvm_external/issues/916#issuecomment-1645527584

Fixes #16839.

Closes #18641

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/18641 from jschaf:joe/protobuf-maven bd2c62f311
PiperOrigin-RevId: 684625084
2024-10-10 17:02:43 -07:00
Protobuf Team Bot
c755d9ac1a Add load() statements for the Bazel builtin top-level java symbols
Loads are being added in preparation for moving the symbols out of Bazel and into `rules_java`.

PiperOrigin-RevId: 625688195
2024-04-17 08:18:16 -07:00
Sandy Zhang
925de189ec Fix mistake in osgi.bzl to actually use list source_jars.
Bazel 7 updated java_out.source_jars to return a Depset.

Release images are still on Bazel 6, but cloudtops were updated to Bazel 7 already.

PiperOrigin-RevId: 617253874
2024-03-19 12:14:37 -07:00
Clayton Walker
d580fde63a Add Automatic-Module-Name (#14562)
Adds Automatic-Module-Name after it was lost during the maven-bazel migration (and subsequent re-addition of osgi bundle support).

Updates OsgiWrapper to support adding the Automatic-Module-Name header to the list of properties supported by the `osgi_java_library` rule.

Fixes #12639

Closes #14562

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/14562 from Sineaggi:add-automatic-module-name a27b3e6695
PiperOrigin-RevId: 579748655
2023-11-06 00:28:10 -08:00
Joshua Haberman
638a860285 Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full.
PiperOrigin-RevId: 563893662
2023-09-08 18:44:16 -07:00
Protobuf Team Bot
e38dcafc7c Prepare osgi.bzl for java_output.source_jars API change
PiperOrigin-RevId: 548984919
2023-07-18 06:36:23 -07:00
Protobuf Team Bot
4b5652b030 Re-attach OSGI headers to lite,core, and util. This information was dropped in the move from maven to bazel.
PiperOrigin-RevId: 518267412
2023-03-21 07:35:58 -07:00