Add jni_md_header for NetBSD (#381) The :jni target pulls the machine-dependent jni_md.h out of the JDK per host, with a java_runtime_files target and a select arm for each platform. FreeBSD and OpenBSD are there; add NetBSD, whose JDK ships include/netbsd/jni_md.h just as the others do, so that Bazel's native code builds against the right header when it is bootstrapped there. The config_setting is defined here rather than taken from @bazel_tools//src/conditions, so that it resolves with every Bazel version rather than only those carrying bazelbuild/bazel#31069. @platforms//os:netbsd has been in the platforms module since 0.0.11, which this module already depends on. DragonFly BSD needs @platforms//os:dragonfly, which is not in a platforms release yet (bazelbuild/platforms#143), so it will follow in a separate change. Closes #381 COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_java/pull/381 from zakinko:bsd-jni-headers 0231dcb4b7b00f868f71199d074dd4e3ad198e5f PiperOrigin-RevId: 983122880 Change-Id: I53649e71b4b50134c91d363cedb2eb2436e8d4e0
Java Rules for Bazel https://bazel.build.
Documentation
For a quickstart tutorial, see https://bazel.build/start/java
The fastest way to try this in an empty project is to click the green “Use this template” button on https://github.com/bazel-starters/java.
For slightly more advanced usage, like setting up toolchains or writing your own java-like rules, see https://bazel.build/docs/bazel-and-java
Core Java rules
Add a load like:
load("@rules_java//java:java_library.bzl", "java_library")
to your BUILD / BUILD.bazel / *.bzl files
For detailed docs on the core rules, see https://bazel.build/reference/be/java