Commit 083b9205 authored by Jiyong Park's avatar Jiyong Park Committed by Steven Moreland
Browse files

Add jni_headers to export only jni.h to vendor and platform.

jni.h is part of the NDK and is guaranteed to be stable also for VNDK

When BOARD_VNDK_VERSION is set, libnativehelper/include/nativehelper is
not in the include paths for vendors and thus jni.h is not accessible
for them. Since jni.h is essential for any JNI lib, this prevents
vendors from building JNI libs.

So, in order to give access to just jni.h, but not others headers such
as JNIHelp.h or UniquePtr.h in the same directory, a header-only lib
'jni_header' is defined. This will be used by both vendor and system
components to get access to jni.h.

Note: if a JNI lib does not use non-NDK libs (such as libcutils,
libutils, libase, etc.) then setting LOCAL_SDK_VERSION allows jni.h
without requiring them to depend on libnativehelper_headers. This
header-only lib is useful when the JNI lib uses the non-NDK libs and
thus LOCAL_SDK_VERSION cannot be an option.

Bug: 37342627
Bug: 63553556
Followup:
Bug: 63762847
Test: BOARD_VNDK_VERSION=current m -j <lib>
<lib> can be vendors' JNI lib such as liblistenjni, libsensor_reg, etc.

Change-Id: Ic57f63b046a50cbb4b10e8c91fb6a5a355f9d03a
parent a22102d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment