Commit Graph

4 Commits

Author SHA1 Message Date
Derek Perez
c684434ecb
creating a single target to rollup maven artifacts (#8776) 2021-06-28 14:38:25 -07:00
Derek Perez
bc45f92262
Bazel powered Java testing (#8506)
* Protobuf Java/Core Tests running w/ Bazel.

Also integrates rules_jvm_external and migrates existing maven deps
in place.

* Add test_suite target that maps to rule name.

* Lite tests passing in Bazel

* util tests passing with Bazel.

* Add conformance and build testing to //java:core

* Cleanup bzl style and lock down access to failure lists.

* Adding Java Lite conformance tests.

* rm newline

* parameterize conformance_test

This makes usage of failure lists more explicit.

* restrict visibility more for newly added libs and fix formatting.

* fix formatting and visibility.

* move testing.bzl to an internal package.

* fix file formatting.

* moving conformance_test to internal.bzl
2021-04-20 11:36:32 -07:00
David Ostrovsky
6bbd56dfd9 Bazel: Discontinue JDK 7 compatibility support
The primary reason to drop that compatibility is because Bazel is
adding unconditionally -parameters option that is not compatible
with JDK 7. This pollutes the build log with annoying warnings:

  warning: -parameters is not supported for target value 1.7. \
  Use 1.8 or later.

Second reason is that nobody in the wild relies on JDK 7 any more
because it was discontinued years ago.

Also remove JDK9 config_setting rule that is not used any more.

Test Plan:

Build :protobuf_java and confirm, that there are no warnings any more
and that major byte version 52 is produced, that corresponds to Java 8:

  $ bazel build protobuf_java
  $ javap -v -cp bazel-bin/java/core/libcore.jar com.google.protobuf.Any | grep major
  major version: 52
2020-05-11 10:01:00 -07:00
Yannic
f0cb9cdb95
[bazel] Move Java runtime/toolchains into //java (#7190)
* [bazel] Move Java runtime/toolchains into //java

This change moves `java_library` targets from the top-level BUILD file
into `//java/{core,lite,util}` and declares `alias` targets to point to
their new locations (hence, this is not a breaking change).

This will allow users that don't use Java to stop depending on
`@rules_java` (e.g. as requested in
https://github.com/bazelbuild/rules_scala/pull/989#issuecomment-583405161).

Note that there is no intention to deprecate + remove the top-level
targets in the foreseeable future.

* Add BUILD files in //java to java_EXTRA_DIST
2020-02-13 13:04:14 -08:00