aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Badour <bbadour@google.com>2021-02-17 18:06:46 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-02-17 18:06:46 +0000
commit6d2060a0dc8cf50df94628224edad96568410efd (patch)
tree5a7f4b1493dee8569a2464fa4b40670fb61ec610
parent02b6e0fefe6fdd775466e6a3b5e7015d586c2558 (diff)
parentaa625efe3bfe85e6e76750babc09cfb8e71f857e (diff)
downloadflatbuffers-6d2060a0dc8cf50df94628224edad96568410efd.tar.gz
[LSC] Add LOCAL_LICENSE_KINDS to external/flatbuffers am: 40ce0940cc am: aa625efe3b
Original change: https://android-review.googlesource.com/c/platform/external/flatbuffers/+/1588827 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9a03beb962fe559d367d7310035d15ba0da0a414
-rw-r--r--Android.bp37
-rw-r--r--android/jni/Android.mk9
-rw-r--r--samples/android/jni/Android.mk3
3 files changed, 49 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 34b98096..c1c0308c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,6 +12,43 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ default_applicable_licenses: ["external_flatbuffers_license"],
+}
+
+// Added automatically by a large-scale-change that took the approach of
+// 'apply every license found to every target'. While this makes sure we respect
+// every license restriction, it may not be entirely correct.
+//
+// e.g. GPL in an MIT project might only apply to the contrib/ directory.
+//
+// Please consider splitting the single license below into multiple licenses,
+// taking care not to lose any license_kind information, and overriding the
+// default license using the 'licenses: [...]' property on targets as needed.
+//
+// For unused files, consider creating a 'fileGroup' with "//visibility:private"
+// to attach the license to, and including a comment whether the files may be
+// used in the current project.
+//
+// large-scale-change included anything that looked like it might be a license
+// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
+//
+// Please consider removing redundant or irrelevant files from 'license_text:'.
+// See: http://go/android-license-faq
+license {
+ name: "external_flatbuffers_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-BSD",
+ "SPDX-license-identifier-Zlib",
+ ],
+ license_text: [
+ "LICENSE",
+ "LICENSE.txt",
+ ],
+}
+
cc_library_headers {
name: "flatbuffer_headers",
export_include_dirs: ["include"],
diff --git a/android/jni/Android.mk b/android/jni/Android.mk
index 78614fb0..765a11dd 100644
--- a/android/jni/Android.mk
+++ b/android/jni/Android.mk
@@ -23,6 +23,9 @@ LOCAL_PATH := $(call realpath-portable,$(LOCAL_PATH))
# FlatBuffers headers as a module.
include $(CLEAR_VARS)
LOCAL_MODULE := flatbuffers
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-Zlib
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE $(LOCAL_PATH)/../../LICENSE.txt
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_CPPFLAGS := -std=c++11 -fexceptions -Wall \
-DFLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
@@ -33,6 +36,9 @@ include $(BUILD_STATIC_LIBRARY)
# for projects that want richer functionality.
include $(CLEAR_VARS)
LOCAL_MODULE := flatbuffers_extra
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-Zlib
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE $(LOCAL_PATH)/../../LICENSE.txt
LOCAL_SRC_FILES := src/idl_parser.cpp \
src/idl_gen_text.cpp \
src/reflection.cpp \
@@ -44,6 +50,9 @@ include $(BUILD_STATIC_LIBRARY)
# FlatBuffers test
include $(CLEAR_VARS)
LOCAL_MODULE := FlatBufferTest
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-Zlib
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE $(LOCAL_PATH)/../../LICENSE.txt
LOCAL_SRC_FILES := android/jni/main.cpp \
tests/test.cpp \
tests/test_assert.h \
diff --git a/samples/android/jni/Android.mk b/samples/android/jni/Android.mk
index 917c2f9e..ea3e6772 100644
--- a/samples/android/jni/Android.mk
+++ b/samples/android/jni/Android.mk
@@ -24,6 +24,9 @@ include $(CLEAR_VARS)
include $(FLATBUFFERS_ROOT_DIR)/android/jni/include.mk
LOCAL_MODULE := FlatBufferSample
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../LICENSE $(LOCAL_PATH)/../../../LICENSE.txt
# Set up some useful variables to identify schema and output directories and
# schema files.