aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2016-04-01 14:20:06 -0700
committerIgor Murashkin <iam@google.com>2016-04-01 14:20:06 -0700
commit05152a01decfcca5cef87e3768852a751e2c67b3 (patch)
tree3e99cb3611a288b8adbcadec0d209e223c601f0e
parent31c0c1865e7ccf6570a2d78dc8f8185ef9c3154f (diff)
downloadsnakeyaml-nougat-mr1.1-release.tar.gz
build: Add device-side build support in the AOSPandroid-cts_7.1_r1android-cts-7.1_r9android-cts-7.1_r8android-cts-7.1_r7android-cts-7.1_r6android-cts-7.1_r5android-cts-7.1_r4android-cts-7.1_r3android-cts-7.1_r29android-cts-7.1_r28android-cts-7.1_r27android-cts-7.1_r26android-cts-7.1_r25android-cts-7.1_r24android-cts-7.1_r23android-cts-7.1_r22android-cts-7.1_r21android-cts-7.1_r20android-cts-7.1_r2android-cts-7.1_r19android-cts-7.1_r18android-cts-7.1_r17android-cts-7.1_r16android-cts-7.1_r15android-cts-7.1_r14android-cts-7.1_r13android-cts-7.1_r12android-cts-7.1_r11android-cts-7.1_r10android-cts-7.1_r1android-cts-7.0_r9android-cts-7.0_r8android-cts-7.0_r7android-cts-7.0_r6android-cts-7.0_r5android-cts-7.0_r4android-cts-7.0_r33android-cts-7.0_r32android-cts-7.0_r31android-cts-7.0_r30android-cts-7.0_r3android-cts-7.0_r29android-cts-7.0_r28android-cts-7.0_r27android-cts-7.0_r26android-cts-7.0_r25android-cts-7.0_r24android-cts-7.0_r23android-cts-7.0_r22android-cts-7.0_r21android-cts-7.0_r20android-cts-7.0_r2android-cts-7.0_r19android-cts-7.0_r18android-cts-7.0_r17android-cts-7.0_r16android-cts-7.0_r15android-cts-7.0_r14android-cts-7.0_r13android-cts-7.0_r12android-cts-7.0_r11android-cts-7.0_r10android-cts-7.0_r1android-7.1.2_r9android-7.1.2_r8android-7.1.2_r6android-7.1.2_r5android-7.1.2_r4android-7.1.2_r39android-7.1.2_r38android-7.1.2_r37android-7.1.2_r36android-7.1.2_r33android-7.1.2_r32android-7.1.2_r30android-7.1.2_r3android-7.1.2_r29android-7.1.2_r28android-7.1.2_r27android-7.1.2_r25android-7.1.2_r24android-7.1.2_r23android-7.1.2_r2android-7.1.2_r19android-7.1.2_r18android-7.1.2_r17android-7.1.2_r16android-7.1.2_r15android-7.1.2_r14android-7.1.2_r13android-7.1.2_r12android-7.1.2_r11android-7.1.2_r10android-7.1.2_r1android-7.1.1_r9android-7.1.1_r8android-7.1.1_r7android-7.1.1_r61android-7.1.1_r60android-7.1.1_r6android-7.1.1_r59android-7.1.1_r58android-7.1.1_r57android-7.1.1_r56android-7.1.1_r55android-7.1.1_r54android-7.1.1_r53android-7.1.1_r52android-7.1.1_r51android-7.1.1_r50android-7.1.1_r49android-7.1.1_r48android-7.1.1_r47android-7.1.1_r46android-7.1.1_r45android-7.1.1_r44android-7.1.1_r43android-7.1.1_r42android-7.1.1_r41android-7.1.1_r40android-7.1.1_r4android-7.1.1_r39android-7.1.1_r38android-7.1.1_r35android-7.1.1_r33android-7.1.1_r32android-7.1.1_r31android-7.1.1_r3android-7.1.1_r28android-7.1.1_r27android-7.1.1_r26android-7.1.1_r25android-7.1.1_r24android-7.1.1_r23android-7.1.1_r22android-7.1.1_r21android-7.1.1_r20android-7.1.1_r2android-7.1.1_r17android-7.1.1_r16android-7.1.1_r15android-7.1.1_r14android-7.1.1_r13android-7.1.1_r12android-7.1.1_r11android-7.1.1_r10android-7.1.1_r1android-7.1.0_r7android-7.1.0_r6android-7.1.0_r5android-7.1.0_r4android-7.1.0_r3android-7.1.0_r2android-7.1.0_r1android-7.0.0_r9android-7.0.0_r8android-7.0.0_r7android-7.0.0_r6android-7.0.0_r5android-7.0.0_r4android-7.0.0_r36android-7.0.0_r35android-7.0.0_r34android-7.0.0_r33android-7.0.0_r32android-7.0.0_r31android-7.0.0_r30android-7.0.0_r3android-7.0.0_r29android-7.0.0_r28android-7.0.0_r27android-7.0.0_r24android-7.0.0_r21android-7.0.0_r19android-7.0.0_r17android-7.0.0_r15android-7.0.0_r14android-7.0.0_r13android-7.0.0_r12android-7.0.0_r11android-7.0.0_r10android-7.0.0_r1nougat-releasenougat-mr2.3-releasenougat-mr2.2-releasenougat-mr2.1-releasenougat-mr2-security-releasenougat-mr2-releasenougat-mr2-pixel-releasenougat-mr2-devnougat-mr1.8-releasenougat-mr1.7-releasenougat-mr1.6-releasenougat-mr1.5-releasenougat-mr1.4-releasenougat-mr1.3-releasenougat-mr1.2-releasenougat-mr1.1-releasenougat-mr1-volantis-releasenougat-mr1-security-releasenougat-mr1-releasenougat-mr1-flounder-releasenougat-mr1-devnougat-mr1-cts-releasenougat-mr0.5-releasenougat-dr1-releasenougat-devnougat-cts-releasenougat-bugfix-release
Bug: 27521545 Change-Id: Ic254894f7dc838e0529b6cd648838b51fea84d0d
-rw-r--r--Android.mk19
-rw-r--r--ApplyAndroidPatches.mk39
2 files changed, 47 insertions, 11 deletions
diff --git a/Android.mk b/Android.mk
index e91fdb14..72703e83 100644
--- a/Android.mk
+++ b/Android.mk
@@ -33,6 +33,13 @@ snakeyaml_src_files_unfiltered := $(call all-java-files-under, src/main)
# We omit the list of files that need to be patched because those are included by LOCAL_GENERATED_SOURCES instead.
snakeyaml_src_files := $(filter-out $(snakeyaml_need_patch_src_files) $(snakeyaml_unsupported_android_src_files),$(snakeyaml_src_files_unfiltered))
+# Target Java build
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := $(snakeyaml_src_files)
+LOCAL_MODULE := snakeyaml
+include $(LOCAL_PATH)/ApplyAndroidPatches.mk
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
# Host-side Java build
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(snakeyaml_src_files_unfiltered)
@@ -43,17 +50,7 @@ include $(BUILD_HOST_JAVA_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(snakeyaml_src_files)
LOCAL_MODULE := snakeyaml-hostdex
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-# Apply all of the Android patches in src/patches/android by running patch-android-src script on them.
-intermediates:= $(local-generated-sources-dir)
-GEN := $(addprefix $(intermediates)/, $(snakeyaml_need_patch_src_files)) # List of all files that need to be patched.
-$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
-$(GEN) : PRIVATE_CUSTOM_TOOL = $(PRIVATE_PATH)/patch-android-src $(PRIVATE_PATH)/ $< $@
-$(GEN): $(intermediates)/%.java : $(LOCAL_PATH)/%.java $(LOCAL_PATH)/patch-android-src
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
+include $(LOCAL_PATH)/ApplyAndroidPatches.mk
include $(BUILD_HOST_DALVIK_JAVA_LIBRARY)
# TODO: Consider adding tests.
diff --git a/ApplyAndroidPatches.mk b/ApplyAndroidPatches.mk
new file mode 100644
index 00000000..ac6ccbc2
--- /dev/null
+++ b/ApplyAndroidPatches.mk
@@ -0,0 +1,39 @@
+# Copyright (C) 2016 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# Apply the android patches in src/patches/android
+# - Required in order to build correctly for AOSP.
+#
+
+#
+# Input variables:
+# (Constant)
+# -- snakeyaml_need_patch_src_files: List of .java files that will need to be patched.
+#
+# This mk file will automatically look up the corresponding patch in src/patches/android
+# and apply it to every file in $(snakeyaml_need_patch_src_files).
+#
+
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+# Apply all of the Android patches in src/patches/android by running patch-android-src script on them.
+intermediates:= $(local-generated-sources-dir)
+GEN := $(addprefix $(intermediates)/, $(snakeyaml_need_patch_src_files)) # List of all files that need to be patched.
+$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
+$(GEN) : PRIVATE_CUSTOM_TOOL = $(PRIVATE_PATH)/patch-android-src $(PRIVATE_PATH)/ $< $@
+$(GEN): $(intermediates)/%.java : $(LOCAL_PATH)/%.java $(LOCAL_PATH)/patch-android-src
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)