Elliott Hughes | 7ee3a06 | 2010-02-18 17:20:15 -0800 | [diff] [blame] | 1 | # -*- mode: makefile -*- |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 2 | # Copyright (C) 2007 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | # |
| 17 | # Definitions for building the Java library and associated tests. |
| 18 | # |
| 19 | |
| 20 | # |
| 21 | # Common definitions for host and target. |
| 22 | # |
| 23 | |
Jesse Wilson | d5d3526 | 2010-05-12 23:56:14 -0700 | [diff] [blame] | 24 | # libcore is divided into modules. |
| 25 | # |
| 26 | # The structure of each module is: |
| 27 | # |
| 28 | # src/ |
| 29 | # main/ # To be shipped on every device. |
| 30 | # java/ # Java source for library code. |
| 31 | # native/ # C++ source for library code. |
| 32 | # resources/ # Support files. |
| 33 | # test/ # Built only on demand, for testing. |
| 34 | # java/ # Java source for tests. |
| 35 | # native/ # C++ source for tests (rare). |
| 36 | # resources/ # Support files. |
| 37 | # |
| 38 | # All subdirectories are optional (hence the "2> /dev/null"s below). |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 39 | |
Colin Cross | 9762264 | 2017-09-21 23:32:23 +0000 | [diff] [blame] | 40 | include $(LOCAL_PATH)/openjdk_java_files.mk |
| 41 | include $(LOCAL_PATH)/non_openjdk_java_files.mk |
| 42 | |
Jesse Wilson | 32cfe95 | 2010-05-04 16:36:03 -0700 | [diff] [blame] | 43 | define all-test-java-files-under |
Przemyslaw Szczepaniak | ebe4f19 | 2015-07-09 13:19:15 +0100 | [diff] [blame] | 44 | $(foreach dir,$(1),$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) && (find $(dir)/src/test/java -name "*.java" 2> /dev/null) | grep -v -f java_tests_blacklist))) |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 45 | endef |
| 46 | |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 47 | define all-core-resource-dirs |
| 48 | $(shell cd $(LOCAL_PATH) && ls -d */src/$(1)/{java,resources} 2> /dev/null) |
| 49 | endef |
| 50 | |
Jesse Wilson | d5d3526 | 2010-05-12 23:56:14 -0700 | [diff] [blame] | 51 | # The Java files and their associated resources. |
Narayan Kamath | 29c564f | 2015-07-30 12:05:42 +0100 | [diff] [blame] | 52 | core_resource_dirs := \ |
| 53 | luni/src/main/java \ |
| 54 | ojluni/src/main/resources/ |
Joachim Sauer | ac12c75 | 2017-01-30 18:47:15 +0000 | [diff] [blame] | 55 | test_resource_dirs := $(filter-out ojluni/%,$(call all-core-resource-dirs,test)) |
Paul Duffin | fe0ee8e | 2016-08-12 11:32:44 +0100 | [diff] [blame] | 56 | test_src_files := $(call all-test-java-files-under,dalvik dalvik/test-rules dom harmony-tests json luni xml) |
Igor Murashkin | 4c65c01 | 2016-03-24 20:52:10 +0000 | [diff] [blame] | 57 | ojtest_src_files := $(call all-test-java-files-under,ojluni) |
Joachim Sauer | ac12c75 | 2017-01-30 18:47:15 +0000 | [diff] [blame] | 58 | ojtest_resource_dirs := $(filter ojluni/%,$(call all-core-resource-dirs,test)) |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 59 | |
Jesse Wilson | 7898a91 | 2010-09-13 15:42:41 -0700 | [diff] [blame] | 60 | ifeq ($(EMMA_INSTRUMENT),true) |
Ying Wang | ff053c3 | 2012-08-21 17:20:51 -0700 | [diff] [blame] | 61 | ifneq ($(EMMA_INSTRUMENT_STATIC),true) |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 62 | nojcore_src_files += $(call all-java-files-under, ../external/emma/core ../external/emma/pregenerated) |
Jesse Wilson | 7898a91 | 2010-09-13 15:42:41 -0700 | [diff] [blame] | 63 | core_resource_dirs += ../external/emma/core/res ../external/emma/pregenerated/res |
| 64 | endif |
Ying Wang | ff053c3 | 2012-08-21 17:20:51 -0700 | [diff] [blame] | 65 | endif |
Jesse Wilson | 7898a91 | 2010-09-13 15:42:41 -0700 | [diff] [blame] | 66 | |
Elliott Hughes | 48d0b3f | 2010-12-14 09:48:52 -0800 | [diff] [blame] | 67 | local_javac_flags=-encoding UTF-8 |
| 68 | #local_javac_flags+=-Xlint:all -Xlint:-serial,-deprecation,-unchecked |
| 69 | local_javac_flags+=-Xmaxwarns 9999999 |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 70 | |
Narayan Kamath | 85952e2 | 2017-06-14 17:23:34 +0100 | [diff] [blame] | 71 | # For user / userdebug builds, strip the local variable table and the local variable |
| 72 | # type table. This has no bearing on stack traces, but will leave less information |
| 73 | # available via JDWP. |
| 74 | # |
| 75 | # TODO: Should this be conditioned on a PRODUCT_ flag or should we just turn this |
| 76 | # on for all builds. Also, name of the flag TBD. |
| 77 | ifneq (,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO)) |
| 78 | ifneq (,$(filter userdebug user,$(TARGET_BUILD_VARIANT))) |
| 79 | local_javac_flags+= -g:source,lines |
| 80 | local_jack_flags+= -D jack.dex.debug.vars=false -D jack.dex.debug.vars.synthetic=false |
| 81 | endif |
| 82 | endif |
Narayan Kamath | 1a0f184 | 2015-09-07 12:59:53 +0100 | [diff] [blame] | 83 | |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 84 | # |
Narayan Kamath | f37f781 | 2015-04-01 09:34:24 +0100 | [diff] [blame] | 85 | # ICU4J related rules. |
| 86 | # |
Neil Fuller | 7280299 | 2015-10-05 15:39:53 +0100 | [diff] [blame] | 87 | # We compile android_icu4j along with core-libart because we're implementing parts of core-libart |
| 88 | # in terms of android_icu4j. |
| 89 | android_icu4j_root := ../external/icu/android_icu4j/ |
Paul Duffin | a98463d | 2016-02-25 16:02:42 +0000 | [diff] [blame] | 90 | android_icu4j_src_files := $(call all-java-files-under,$(android_icu4j_root)/src/main/java) |
Neil Fuller | 7280299 | 2015-10-05 15:39:53 +0100 | [diff] [blame] | 91 | android_icu4j_resource_dirs := $(android_icu4j_root)/resources |
Narayan Kamath | f37f781 | 2015-04-01 09:34:24 +0100 | [diff] [blame] | 92 | |
| 93 | # |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 94 | # Build for the target (device). |
| 95 | # |
| 96 | |
Colin Cross | 9762264 | 2017-09-21 23:32:23 +0000 | [diff] [blame] | 97 | include $(CLEAR_VARS) |
| 98 | LOCAL_SRC_FILES := $(openjdk_java_files) $(non_openjdk_java_files) $(android_icu4j_src_files) $(openjdk_lambda_stub_files) |
| 99 | LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) $(android_icu4j_resource_dirs) |
| 100 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 101 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 102 | LOCAL_JACK_FLAGS := $(local_jack_flags) |
| 103 | LOCAL_DX_FLAGS := --core-library |
| 104 | LOCAL_MODULE_TAGS := optional |
| 105 | LOCAL_MODULE := core-all |
| 106 | LOCAL_REQUIRED_MODULES := tzdata tzlookup.xml |
| 107 | LOCAL_CORE_LIBRARY := true |
| 108 | LOCAL_UNINSTALLABLE_MODULE := true |
| 109 | include $(BUILD_JAVA_LIBRARY) |
| 110 | |
| 111 | include $(CLEAR_VARS) |
| 112 | LOCAL_SRC_FILES := $(openjdk_java_files) |
| 113 | LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) |
| 114 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 115 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 116 | LOCAL_JACK_FLAGS := $(local_jack_flags) |
| 117 | LOCAL_DX_FLAGS := --core-library |
| 118 | LOCAL_MODULE_TAGS := optional |
| 119 | LOCAL_MODULE := core-oj |
| 120 | LOCAL_JAVA_LIBRARIES := core-all |
| 121 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/ojluni/NOTICE |
| 122 | LOCAL_REQUIRED_MODULES := tzdata tzlookup.xml |
| 123 | LOCAL_CORE_LIBRARY := true |
| 124 | include $(BUILD_JAVA_LIBRARY) |
| 125 | |
| 126 | # Definitions to make the core library. |
| 127 | include $(CLEAR_VARS) |
| 128 | LOCAL_SRC_FILES := $(non_openjdk_java_files) $(android_icu4j_src_files) |
| 129 | LOCAL_JAVA_RESOURCE_DIRS := $(android_icu4j_resource_dirs) |
| 130 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 131 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 132 | LOCAL_JACK_FLAGS := $(local_jack_flags) |
| 133 | LOCAL_DX_FLAGS := --core-library |
| 134 | LOCAL_MODULE_TAGS := optional |
| 135 | LOCAL_MODULE := core-libart |
| 136 | LOCAL_JAVA_LIBRARIES := core-all |
| 137 | LOCAL_CORE_LIBRARY := true |
| 138 | LOCAL_REQUIRED_MODULES := tzdata tzlookup.xml |
| 139 | include $(BUILD_JAVA_LIBRARY) |
| 140 | |
| 141 | # A library that exists to satisfy javac when |
| 142 | # compiling source code that contains lambdas. |
| 143 | include $(CLEAR_VARS) |
| 144 | LOCAL_SRC_FILES := $(openjdk_lambda_stub_files) $(openjdk_lambda_duplicate_stub_files) |
| 145 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 146 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 147 | LOCAL_JACK_FLAGS := $(local_jack_flags) |
| 148 | LOCAL_DX_FLAGS := --core-library |
| 149 | LOCAL_MODULE_TAGS := optional |
| 150 | LOCAL_MODULE := core-lambda-stubs |
Colin Cross | b218d66 | 2017-09-21 17:25:56 -0700 | [diff] [blame] | 151 | # Deliberately include the sources alongside the .class files to simplify |
| 152 | # distribution |
| 153 | LOCAL_JAVA_RESOURCE_FILES := \ |
| 154 | $(patsubst ojluni/src/lambda/java/%, \ |
| 155 | $(LOCAL_PATH)/ojluni/src/lambda/java:%,$(LOCAL_SRC_FILES)) |
Colin Cross | 9762264 | 2017-09-21 23:32:23 +0000 | [diff] [blame] | 156 | LOCAL_JAVA_LIBRARIES := core-all |
| 157 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/ojluni/NOTICE |
| 158 | LOCAL_CORE_LIBRARY := true |
| 159 | LOCAL_UNINSTALLABLE_MODULE := true |
| 160 | include $(BUILD_JAVA_LIBRARY) |
| 161 | |
Kenny Root | 38375a4 | 2013-04-23 15:50:31 -0700 | [diff] [blame] | 162 | ifeq ($(LIBCORE_SKIP_TESTS),) |
Nicolas Geoffray | 2b42260 | 2017-03-01 10:49:31 +0000 | [diff] [blame] | 163 | # A guaranteed unstripped version of core-oj and core-libart. |
| 164 | # The build system may or may not strip the core-oj and core-libart jars, |
| 165 | # but these will not be stripped. See b/24535627. |
Andreas Gampe | 7859026 | 2015-09-30 11:55:03 -0700 | [diff] [blame] | 166 | include $(CLEAR_VARS) |
Colin Cross | 9762264 | 2017-09-21 23:32:23 +0000 | [diff] [blame] | 167 | LOCAL_SRC_FILES := $(openjdk_java_files) |
Andreas Gampe | 7859026 | 2015-09-30 11:55:03 -0700 | [diff] [blame] | 168 | LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) |
| 169 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 170 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Narayan Kamath | 85952e2 | 2017-06-14 17:23:34 +0100 | [diff] [blame] | 171 | LOCAL_JACK_FLAGS := $(local_jack_flags) |
Colin Cross | 96a5529 | 2016-12-21 16:42:56 -0800 | [diff] [blame] | 172 | LOCAL_DX_FLAGS := --core-library |
Andreas Gampe | 7859026 | 2015-09-30 11:55:03 -0700 | [diff] [blame] | 173 | LOCAL_MODULE_TAGS := optional |
| 174 | LOCAL_DEX_PREOPT := false |
| 175 | LOCAL_MODULE := core-oj-testdex |
Andreas Gampe | 7859026 | 2015-09-30 11:55:03 -0700 | [diff] [blame] | 176 | LOCAL_JAVA_LIBRARIES := core-all |
| 177 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/ojluni/NOTICE |
Neil Fuller | 085fbff | 2017-03-30 18:18:11 +0100 | [diff] [blame] | 178 | LOCAL_REQUIRED_MODULES := tzdata tzlookup.xml |
Andreas Gampe | 7859026 | 2015-09-30 11:55:03 -0700 | [diff] [blame] | 179 | LOCAL_CORE_LIBRARY := true |
Andreas Gampe | 7859026 | 2015-09-30 11:55:03 -0700 | [diff] [blame] | 180 | include $(BUILD_JAVA_LIBRARY) |
| 181 | |
Paul Duffin | fe0ee8e | 2016-08-12 11:32:44 +0100 | [diff] [blame] | 182 | # Build libcore test rules for target |
| 183 | include $(CLEAR_VARS) |
| 184 | LOCAL_SRC_FILES := $(call all-java-files-under, dalvik/test-rules/src/main test-rules/src/main) |
| 185 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 186 | LOCAL_MODULE := core-test-rules |
Paul Duffin | c347df8 | 2016-11-29 12:17:05 +0000 | [diff] [blame] | 187 | LOCAL_JAVA_LIBRARIES := core-all |
| 188 | LOCAL_STATIC_JAVA_LIBRARIES := junit |
Paul Duffin | fe0ee8e | 2016-08-12 11:32:44 +0100 | [diff] [blame] | 189 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 190 | |
| 191 | # Build libcore test rules for host |
| 192 | include $(CLEAR_VARS) |
| 193 | LOCAL_SRC_FILES := $(call all-java-files-under, dalvik/test-rules/src/main test-rules/src/main) |
| 194 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 195 | LOCAL_MODULE := core-test-rules-hostdex |
Paul Duffin | 1eac8b3 | 2016-11-25 14:40:21 +0000 | [diff] [blame] | 196 | LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex |
| 197 | LOCAL_STATIC_JAVA_LIBRARIES := junit-hostdex |
Colin Cross | 5c173d7 | 2017-01-19 14:20:20 -0800 | [diff] [blame] | 198 | include $(BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY) |
Paul Duffin | fe0ee8e | 2016-08-12 11:32:44 +0100 | [diff] [blame] | 199 | |
Andreas Gampe | 7859026 | 2015-09-30 11:55:03 -0700 | [diff] [blame] | 200 | include $(CLEAR_VARS) |
Colin Cross | 9762264 | 2017-09-21 23:32:23 +0000 | [diff] [blame] | 201 | LOCAL_SRC_FILES := $(non_openjdk_java_files) $(android_icu4j_src_files) |
Andreas Gampe | 7859026 | 2015-09-30 11:55:03 -0700 | [diff] [blame] | 202 | LOCAL_JAVA_RESOURCE_DIRS := $(android_icu4j_resource_dirs) |
| 203 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 204 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Narayan Kamath | 85952e2 | 2017-06-14 17:23:34 +0100 | [diff] [blame] | 205 | LOCAL_JACK_FLAGS := $(local_jack_flags) |
Colin Cross | 96a5529 | 2016-12-21 16:42:56 -0800 | [diff] [blame] | 206 | LOCAL_DX_FLAGS := --core-library |
Andreas Gampe | 7859026 | 2015-09-30 11:55:03 -0700 | [diff] [blame] | 207 | LOCAL_MODULE_TAGS := optional |
| 208 | LOCAL_DEX_PREOPT := false |
| 209 | LOCAL_MODULE := core-libart-testdex |
Andreas Gampe | 7859026 | 2015-09-30 11:55:03 -0700 | [diff] [blame] | 210 | LOCAL_JAVA_LIBRARIES := core-all |
| 211 | LOCAL_CORE_LIBRARY := true |
Neil Fuller | 085fbff | 2017-03-30 18:18:11 +0100 | [diff] [blame] | 212 | LOCAL_REQUIRED_MODULES := tzdata tzlookup.xml |
Andreas Gampe | 7859026 | 2015-09-30 11:55:03 -0700 | [diff] [blame] | 213 | include $(BUILD_JAVA_LIBRARY) |
| 214 | endif |
| 215 | |
| 216 | ifeq ($(LIBCORE_SKIP_TESTS),) |
Shubham Ajmera | cfcde6a | 2017-02-09 13:24:00 +0000 | [diff] [blame] | 217 | # Build a library just containing files from luni/src/test/filesystems for use in tests. |
| 218 | include $(CLEAR_VARS) |
| 219 | LOCAL_SRC_FILES := $(call all-java-files-under, luni/src/test/filesystems/src) |
| 220 | LOCAL_JAVA_RESOURCE_DIRS := luni/src/test/filesystems/resources |
| 221 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 222 | LOCAL_MODULE := filesystemstest |
| 223 | LOCAL_JAVA_LIBRARIES := core-oj core-libart |
| 224 | LOCAL_DEX_PREOPT := false |
| 225 | include $(BUILD_JAVA_LIBRARY) |
Dan Willemsen | 6a6398f | 2017-03-20 10:47:51 -0700 | [diff] [blame] | 226 | my_filesystemstest_jar := $(intermediates)/filesystemstest.jar |
| 227 | $(my_filesystemstest_jar): $(LOCAL_BUILT_MODULE) |
| 228 | $(call copy-file-to-target) |
Shubham Ajmera | cfcde6a | 2017-02-09 13:24:00 +0000 | [diff] [blame] | 229 | endif |
| 230 | |
| 231 | ifeq ($(LIBCORE_SKIP_TESTS),) |
Kenny Root | 38375a4 | 2013-04-23 15:50:31 -0700 | [diff] [blame] | 232 | # Make the core-tests library. |
| 233 | include $(CLEAR_VARS) |
Narayan Kamath | 51525b5 | 2013-11-15 18:02:54 +0000 | [diff] [blame] | 234 | LOCAL_SRC_FILES := $(test_src_files) |
Brian Carlstrom | 51ee38b | 2010-07-23 15:57:52 -0700 | [diff] [blame] | 235 | LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) |
Shubham Ajmera | cfcde6a | 2017-02-09 13:24:00 +0000 | [diff] [blame] | 236 | # Include individual dex.jar files (jars containing resources and a classes.dex) so that they |
| 237 | # be loaded by tests using ClassLoaders but are not in the main classes.dex. |
Dan Willemsen | 6a6398f | 2017-03-20 10:47:51 -0700 | [diff] [blame] | 238 | LOCAL_JAVA_RESOURCE_FILES := $(my_filesystemstest_jar) |
Brian Carlstrom | 51ee38b | 2010-07-23 15:57:52 -0700 | [diff] [blame] | 239 | LOCAL_NO_STANDARD_LIBRARIES := true |
Adam Vartanian | ce69636 | 2017-03-03 14:07:19 +0000 | [diff] [blame] | 240 | LOCAL_JAVA_LIBRARIES := core-oj core-libart okhttp bouncycastle |
Paul Duffin | fe0ee8e | 2016-08-12 11:32:44 +0100 | [diff] [blame] | 241 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Neil Fuller | f04b9af | 2017-05-24 11:48:12 +0100 | [diff] [blame] | 242 | archive-patcher \ |
Paul Duffin | fe0ee8e | 2016-08-12 11:32:44 +0100 | [diff] [blame] | 243 | core-test-rules \ |
| 244 | core-tests-support \ |
Neil Fuller | f04b9af | 2017-05-24 11:48:12 +0100 | [diff] [blame] | 245 | junit-params \ |
Tobias Thierer | 62db9f9 | 2016-11-28 12:24:32 +0000 | [diff] [blame] | 246 | mockftpserver \ |
Adam Vartanian | ce69636 | 2017-03-03 14:07:19 +0000 | [diff] [blame] | 247 | mockito-target \ |
Paul Duffin | fe0ee8e | 2016-08-12 11:32:44 +0100 | [diff] [blame] | 248 | mockwebserver \ |
| 249 | nist-pkix-tests \ |
Tobias Thierer | 62db9f9 | 2016-11-28 12:24:32 +0000 | [diff] [blame] | 250 | slf4j-jdk14 \ |
Neil Fuller | 8e0c349 | 2016-12-09 18:32:10 +0000 | [diff] [blame] | 251 | sqlite-jdbc \ |
Neil Fuller | f04b9af | 2017-05-24 11:48:12 +0100 | [diff] [blame] | 252 | tzdata-testing |
Elliott Hughes | d610834 | 2011-02-22 10:13:54 -0800 | [diff] [blame] | 253 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Narayan Kamath | 85952e2 | 2017-06-14 17:23:34 +0100 | [diff] [blame] | 254 | LOCAL_JACK_FLAGS := $(local_jack_flags) |
Sergio Giro | 2cdb68f | 2016-10-28 20:13:36 +0100 | [diff] [blame] | 255 | LOCAL_ERROR_PRONE_FLAGS := -Xep:TryFailThrowable:ERROR -Xep:ComparisonOutOfRange:ERROR |
Brian Carlstrom | b094af3 | 2010-05-28 17:37:37 -0700 | [diff] [blame] | 256 | LOCAL_MODULE := core-tests |
Jesse Wilson | 706d535 | 2010-06-08 17:20:09 -0700 | [diff] [blame] | 257 | include $(BUILD_STATIC_JAVA_LIBRARY) |
Elliott Hughes | c5cd6e8 | 2012-10-18 18:13:10 -0700 | [diff] [blame] | 258 | endif |
Jesse Wilson | 706d535 | 2010-06-08 17:20:09 -0700 | [diff] [blame] | 259 | |
Tsu Chiang Chuang | 808558f | 2013-08-21 11:46:49 -0700 | [diff] [blame] | 260 | ifeq ($(LIBCORE_SKIP_TESTS),) |
Kenny Root | b397b19 | 2013-08-29 14:24:47 -0700 | [diff] [blame] | 261 | # Make the core-tests-support library. |
| 262 | include $(CLEAR_VARS) |
| 263 | LOCAL_SRC_FILES := $(call all-test-java-files-under,support) |
| 264 | LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) |
| 265 | LOCAL_NO_STANDARD_LIBRARIES := true |
Paul Duffin | c347df8 | 2016-11-29 12:17:05 +0000 | [diff] [blame] | 266 | LOCAL_JAVA_LIBRARIES := core-oj core-libart junit bouncycastle |
Kenny Root | 0435fdb | 2016-03-30 12:52:38 -0700 | [diff] [blame] | 267 | LOCAL_STATIC_JAVA_LIBRARIES := bouncycastle-bcpkix bouncycastle-ocsp |
Kenny Root | b397b19 | 2013-08-29 14:24:47 -0700 | [diff] [blame] | 268 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Narayan Kamath | 85952e2 | 2017-06-14 17:23:34 +0100 | [diff] [blame] | 269 | LOCAL_JACK_FLAGS := $(local_jack_flags) |
Kenny Root | b397b19 | 2013-08-29 14:24:47 -0700 | [diff] [blame] | 270 | LOCAL_MODULE := core-tests-support |
Kenny Root | b397b19 | 2013-08-29 14:24:47 -0700 | [diff] [blame] | 271 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 272 | endif |
| 273 | |
| 274 | ifeq ($(LIBCORE_SKIP_TESTS),) |
Tsu Chiang Chuang | 808558f | 2013-08-21 11:46:49 -0700 | [diff] [blame] | 275 | # Make the jsr166-tests library. |
| 276 | include $(CLEAR_VARS) |
| 277 | LOCAL_SRC_FILES := $(call all-test-java-files-under, jsr166-tests) |
| 278 | LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) |
| 279 | LOCAL_NO_STANDARD_LIBRARIES := true |
Paul Duffin | c347df8 | 2016-11-29 12:17:05 +0000 | [diff] [blame] | 280 | LOCAL_JAVA_LIBRARIES := core-oj core-libart junit |
Tsu Chiang Chuang | 808558f | 2013-08-21 11:46:49 -0700 | [diff] [blame] | 281 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Narayan Kamath | 85952e2 | 2017-06-14 17:23:34 +0100 | [diff] [blame] | 282 | LOCAL_JACK_FLAGS := $(local_jack_flags) |
Tsu Chiang Chuang | 808558f | 2013-08-21 11:46:49 -0700 | [diff] [blame] | 283 | LOCAL_MODULE := jsr166-tests |
Tsu Chiang Chuang | 808558f | 2013-08-21 11:46:49 -0700 | [diff] [blame] | 284 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 285 | endif |
| 286 | |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 287 | # Make the core-ojtests library. |
| 288 | ifeq ($(LIBCORE_SKIP_TESTS),) |
| 289 | include $(CLEAR_VARS) |
Joachim Sauer | ac12c75 | 2017-01-30 18:47:15 +0000 | [diff] [blame] | 290 | LOCAL_JAVA_RESOURCE_DIRS := $(ojtest_resource_dirs) |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 291 | LOCAL_NO_STANDARD_LIBRARIES := true |
Narayan Kamath | d097a9b | 2016-09-22 17:07:15 +0100 | [diff] [blame] | 292 | LOCAL_JAVA_LIBRARIES := core-oj core-libart okhttp bouncycastle |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 293 | LOCAL_STATIC_JAVA_LIBRARIES := testng |
| 294 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Narayan Kamath | 85952e2 | 2017-06-14 17:23:34 +0100 | [diff] [blame] | 295 | LOCAL_JACK_FLAGS := $(local_jack_flags) |
Colin Cross | 96a5529 | 2016-12-21 16:42:56 -0800 | [diff] [blame] | 296 | LOCAL_DX_FLAGS := --core-library |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 297 | LOCAL_MODULE_TAGS := optional |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 298 | LOCAL_MODULE := core-ojtests |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 299 | # jack bug workaround: int[] java.util.stream.StatefulTestOp.-getjava-util-stream-StreamShapeSwitchesValues() is a private synthetic method in an interface which causes a hard verifier error |
| 300 | LOCAL_DEX_PREOPT := false # disable AOT preverification which breaks the build. it will still throw VerifyError at runtime. |
| 301 | include $(BUILD_JAVA_LIBRARY) |
| 302 | endif |
| 303 | |
| 304 | # Make the core-ojtests-public library. Excludes any private API tests. |
| 305 | ifeq ($(LIBCORE_SKIP_TESTS),) |
| 306 | include $(CLEAR_VARS) |
| 307 | # Filter out SerializedLambdaTest because it depends on stub classes and won't actually run. |
Joachim Sauer | 8aeb919 | 2017-01-06 17:05:35 +0000 | [diff] [blame] | 308 | LOCAL_SRC_FILES := $(filter-out %/DeserializeMethodTest.java %/SerializedLambdaTest.java ojluni/src/test/java/util/stream/boot%,$(ojtest_src_files)) # Do not include anything from the boot* directories. Those directories need a custom bootclasspath to run. |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 309 | # Include source code as part of JAR |
Joachim Sauer | ac12c75 | 2017-01-30 18:47:15 +0000 | [diff] [blame] | 310 | LOCAL_JAVA_RESOURCE_DIRS := ojluni/src/test/dist $(ojtest_resource_dirs) |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 311 | LOCAL_NO_STANDARD_LIBRARIES := true |
Tobias Thierer | d5e8f8c | 2016-12-22 12:25:26 +0000 | [diff] [blame] | 312 | LOCAL_JAVA_LIBRARIES := \ |
| 313 | bouncycastle \ |
| 314 | core-libart \ |
| 315 | core-oj \ |
| 316 | okhttp \ |
| 317 | testng |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 318 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Narayan Kamath | 85952e2 | 2017-06-14 17:23:34 +0100 | [diff] [blame] | 319 | LOCAL_JACK_FLAGS := $(local_jack_flags) |
Colin Cross | 96a5529 | 2016-12-21 16:42:56 -0800 | [diff] [blame] | 320 | LOCAL_DX_FLAGS := --core-library |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 321 | LOCAL_MODULE_TAGS := optional |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 322 | LOCAL_MODULE := core-ojtests-public |
Igor Murashkin | c8b2c56 | 2016-04-27 15:43:33 -0700 | [diff] [blame] | 323 | # jack bug workaround: int[] java.util.stream.StatefulTestOp.-getjava-util-stream-StreamShapeSwitchesValues() is a private synthetic method in an interface which causes a hard verifier error |
| 324 | LOCAL_DEX_PREOPT := false # disable AOT preverification which breaks the build. it will still throw VerifyError at runtime. |
| 325 | include $(BUILD_JAVA_LIBRARY) |
| 326 | endif |
| 327 | |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 328 | # |
| 329 | # Build for the host. |
| 330 | # |
| 331 | |
Elliott Hughes | e983a0b | 2015-01-16 10:47:17 -0800 | [diff] [blame] | 332 | ifeq ($(HOST_OS),linux) |
| 333 | |
Ian Rogers | 3deabd2 | 2014-05-23 15:12:42 -0700 | [diff] [blame] | 334 | include $(CLEAR_VARS) |
Colin Cross | 9762264 | 2017-09-21 23:32:23 +0000 | [diff] [blame] | 335 | LOCAL_SRC_FILES := $(non_openjdk_java_files) $(openjdk_java_files) $(android_icu4j_src_files) $(openjdk_lambda_stub_files) |
Przemyslaw Szczepaniak | e3b37c2 | 2015-09-28 16:24:00 +0100 | [diff] [blame] | 336 | LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) |
Ian Rogers | 3deabd2 | 2014-05-23 15:12:42 -0700 | [diff] [blame] | 337 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 338 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Colin Cross | 96a5529 | 2016-12-21 16:42:56 -0800 | [diff] [blame] | 339 | LOCAL_DX_FLAGS := --core-library |
Ian Rogers | 3deabd2 | 2014-05-23 15:12:42 -0700 | [diff] [blame] | 340 | LOCAL_MODULE_TAGS := optional |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 341 | LOCAL_MODULE := core-all-hostdex |
Neil Fuller | 085fbff | 2017-03-30 18:18:11 +0100 | [diff] [blame] | 342 | LOCAL_REQUIRED_MODULES := tzdata-host tzlookup.xml-host |
Piotr Jastrzebski | 5c3c9df | 2015-04-20 10:56:00 +0100 | [diff] [blame] | 343 | LOCAL_CORE_LIBRARY := true |
Narayan Kamath | 0ebbfbd | 2015-07-30 15:01:19 +0100 | [diff] [blame] | 344 | LOCAL_UNINSTALLABLE_MODULE := true |
Ian Rogers | 3deabd2 | 2014-05-23 15:12:42 -0700 | [diff] [blame] | 345 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 346 | |
Narayan Kamath | f41eec8 | 2015-11-20 12:39:23 +0000 | [diff] [blame] | 347 | include $(CLEAR_VARS) |
Colin Cross | 9762264 | 2017-09-21 23:32:23 +0000 | [diff] [blame] | 348 | LOCAL_SRC_FILES := $(openjdk_java_files) |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 349 | LOCAL_JAVA_RESOURCE_DIRS := $(core_resource_dirs) |
Narayan Kamath | f41eec8 | 2015-11-20 12:39:23 +0000 | [diff] [blame] | 350 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 351 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Colin Cross | 96a5529 | 2016-12-21 16:42:56 -0800 | [diff] [blame] | 352 | LOCAL_DX_FLAGS := --core-library |
Narayan Kamath | f41eec8 | 2015-11-20 12:39:23 +0000 | [diff] [blame] | 353 | LOCAL_MODULE_TAGS := optional |
| 354 | LOCAL_MODULE := core-oj-hostdex |
Narayan Kamath | 558a2d1 | 2015-12-22 14:37:40 +0000 | [diff] [blame] | 355 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/ojluni/NOTICE |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 356 | LOCAL_JAVA_LIBRARIES := core-all-hostdex |
Neil Fuller | 085fbff | 2017-03-30 18:18:11 +0100 | [diff] [blame] | 357 | LOCAL_REQUIRED_MODULES := tzdata-host tzlookup.xml-host |
Narayan Kamath | f41eec8 | 2015-11-20 12:39:23 +0000 | [diff] [blame] | 358 | LOCAL_CORE_LIBRARY := true |
Narayan Kamath | f41eec8 | 2015-11-20 12:39:23 +0000 | [diff] [blame] | 359 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
| 360 | |
Kenny Root | ba07db5 | 2013-08-29 13:40:35 -0700 | [diff] [blame] | 361 | # Definitions to make the core library. |
| 362 | include $(CLEAR_VARS) |
Colin Cross | 9762264 | 2017-09-21 23:32:23 +0000 | [diff] [blame] | 363 | LOCAL_SRC_FILES := $(non_openjdk_java_files) $(android_icu4j_src_files) |
Narayan Kamath | a61daf4 | 2015-11-24 13:31:36 +0000 | [diff] [blame] | 364 | LOCAL_JAVA_RESOURCE_DIRS := $(android_icu4j_resource_dirs) |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 365 | LOCAL_NO_STANDARD_LIBRARIES := true |
Elliott Hughes | e983a0b | 2015-01-16 10:47:17 -0800 | [diff] [blame] | 366 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Colin Cross | 96a5529 | 2016-12-21 16:42:56 -0800 | [diff] [blame] | 367 | LOCAL_DX_FLAGS := --core-library |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 368 | LOCAL_MODULE_TAGS := optional |
| 369 | LOCAL_MODULE := core-libart-hostdex |
Piotr Jastrzebski | 51b1b69 | 2015-02-16 15:01:09 +0000 | [diff] [blame] | 370 | LOCAL_JAVA_LIBRARIES := core-oj-hostdex |
Neil Fuller | 085fbff | 2017-03-30 18:18:11 +0100 | [diff] [blame] | 371 | LOCAL_REQUIRED_MODULES := tzdata-host tzlookup.xml-host |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 372 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
| 373 | |
Neil Fuller | 3375f98 | 2016-02-15 14:39:05 +0000 | [diff] [blame] | 374 | # A library that exists to satisfy javac when |
| 375 | # compiling source code that contains lambdas. |
| 376 | include $(CLEAR_VARS) |
Colin Cross | 9762264 | 2017-09-21 23:32:23 +0000 | [diff] [blame] | 377 | LOCAL_SRC_FILES := $(openjdk_lambda_stub_files) $(openjdk_lambda_duplicate_stub_files) |
Neil Fuller | 3375f98 | 2016-02-15 14:39:05 +0000 | [diff] [blame] | 378 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 379 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Colin Cross | 96a5529 | 2016-12-21 16:42:56 -0800 | [diff] [blame] | 380 | LOCAL_DX_FLAGS := --core-library |
Neil Fuller | 3375f98 | 2016-02-15 14:39:05 +0000 | [diff] [blame] | 381 | LOCAL_MODULE_TAGS := optional |
Neil Fuller | 3375f98 | 2016-02-15 14:39:05 +0000 | [diff] [blame] | 382 | LOCAL_MODULE := core-lambda-stubs-hostdex |
Neil Fuller | 3375f98 | 2016-02-15 14:39:05 +0000 | [diff] [blame] | 383 | LOCAL_JAVA_LIBRARIES := core-all-hostdex |
| 384 | LOCAL_CORE_LIBRARY := true |
| 385 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
| 386 | |
Paul Duffin | fe0ee8e | 2016-08-12 11:32:44 +0100 | [diff] [blame] | 387 | # Make the core-tests-hostdex library. |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 388 | ifeq ($(LIBCORE_SKIP_TESTS),) |
| 389 | include $(CLEAR_VARS) |
| 390 | LOCAL_SRC_FILES := $(test_src_files) |
| 391 | LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) |
| 392 | LOCAL_NO_STANDARD_LIBRARIES := true |
Tobias Thierer | d5e8f8c | 2016-12-22 12:25:26 +0000 | [diff] [blame] | 393 | LOCAL_JAVA_LIBRARIES := \ |
| 394 | bouncycastle-hostdex \ |
| 395 | core-libart-hostdex \ |
| 396 | core-oj-hostdex \ |
| 397 | core-tests-support-hostdex \ |
| 398 | junit-hostdex \ |
| 399 | mockito-api-hostdex \ |
| 400 | okhttp-hostdex |
| 401 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Neil Fuller | f04b9af | 2017-05-24 11:48:12 +0100 | [diff] [blame] | 402 | archive-patcher-hostdex \ |
Tobias Thierer | d5e8f8c | 2016-12-22 12:25:26 +0000 | [diff] [blame] | 403 | core-test-rules-hostdex \ |
Neil Fuller | f04b9af | 2017-05-24 11:48:12 +0100 | [diff] [blame] | 404 | junit-params-hostdex \ |
Tobias Thierer | 62db9f9 | 2016-11-28 12:24:32 +0000 | [diff] [blame] | 405 | mockftpserver-hostdex \ |
Tobias Thierer | d5e8f8c | 2016-12-22 12:25:26 +0000 | [diff] [blame] | 406 | mockwebserver-host \ |
| 407 | nist-pkix-tests-host \ |
Tobias Thierer | 62db9f9 | 2016-11-28 12:24:32 +0000 | [diff] [blame] | 408 | slf4j-jdk14-hostdex \ |
Tobias Thierer | d5e8f8c | 2016-12-22 12:25:26 +0000 | [diff] [blame] | 409 | sqlite-jdbc-host \ |
Neil Fuller | f04b9af | 2017-05-24 11:48:12 +0100 | [diff] [blame] | 410 | tzdata-testing-hostdex |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 411 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 412 | LOCAL_MODULE_TAGS := optional |
| 413 | LOCAL_MODULE := core-tests-hostdex |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 414 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
| 415 | endif |
Elliott Hughes | d610834 | 2011-02-22 10:13:54 -0800 | [diff] [blame] | 416 | |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 417 | # Make the core-tests-support library. |
| 418 | ifeq ($(LIBCORE_SKIP_TESTS),) |
| 419 | include $(CLEAR_VARS) |
| 420 | LOCAL_SRC_FILES := $(call all-test-java-files-under,support) |
| 421 | LOCAL_JAVA_RESOURCE_DIRS := $(test_resource_dirs) |
| 422 | LOCAL_NO_STANDARD_LIBRARIES := true |
Tobias Thierer | d5e8f8c | 2016-12-22 12:25:26 +0000 | [diff] [blame] | 423 | LOCAL_JAVA_LIBRARIES := \ |
| 424 | bouncycastle-hostdex \ |
| 425 | core-libart-hostdex \ |
| 426 | core-oj-hostdex \ |
| 427 | junit-hostdex |
| 428 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
| 429 | bouncycastle-bcpkix-hostdex \ |
| 430 | bouncycastle-ocsp-hostdex |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 431 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 432 | LOCAL_MODULE_TAGS := optional |
| 433 | LOCAL_MODULE := core-tests-support-hostdex |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 434 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
| 435 | endif |
| 436 | |
Igor Murashkin | 6037000 | 2016-04-04 11:53:53 -0700 | [diff] [blame] | 437 | # Make the core-ojtests-hostdex library. |
Igor Murashkin | 4c65c01 | 2016-03-24 20:52:10 +0000 | [diff] [blame] | 438 | ifeq ($(LIBCORE_SKIP_TESTS),) |
| 439 | include $(CLEAR_VARS) |
| 440 | LOCAL_SRC_FILES := $(ojtest_src_files) |
| 441 | LOCAL_NO_STANDARD_LIBRARIES := true |
Tobias Thierer | d5e8f8c | 2016-12-22 12:25:26 +0000 | [diff] [blame] | 442 | LOCAL_JAVA_LIBRARIES := \ |
| 443 | bouncycastle-hostdex \ |
| 444 | core-libart-hostdex \ |
| 445 | core-oj-hostdex \ |
| 446 | okhttp-hostdex |
Igor Murashkin | 4c65c01 | 2016-03-24 20:52:10 +0000 | [diff] [blame] | 447 | LOCAL_STATIC_JAVA_LIBRARIES := testng-hostdex |
| 448 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Colin Cross | abbd52b | 2017-02-24 15:39:22 -0800 | [diff] [blame] | 449 | LOCAL_DX_FLAGS := --core-library |
Igor Murashkin | 4c65c01 | 2016-03-24 20:52:10 +0000 | [diff] [blame] | 450 | LOCAL_MODULE_TAGS := optional |
Igor Murashkin | 4c65c01 | 2016-03-24 20:52:10 +0000 | [diff] [blame] | 451 | LOCAL_MODULE := core-ojtests-hostdex |
Igor Murashkin | 4c65c01 | 2016-03-24 20:52:10 +0000 | [diff] [blame] | 452 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
| 453 | endif |
| 454 | |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 455 | endif # HOST_OS == linux |
| 456 | |
| 457 | # |
Elliott Hughes | 92fc63e | 2013-02-07 17:05:57 -0800 | [diff] [blame] | 458 | # Local droiddoc for faster libcore testing |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 459 | # |
| 460 | # |
Elliott Hughes | 92fc63e | 2013-02-07 17:05:57 -0800 | [diff] [blame] | 461 | # Run with: |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 462 | # mm -j32 libcore-docs |
| 463 | # |
Elliott Hughes | 92fc63e | 2013-02-07 17:05:57 -0800 | [diff] [blame] | 464 | # Main output: |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 465 | # ../out/target/common/docs/libcore/reference/packages.html |
| 466 | # |
Elliott Hughes | 92fc63e | 2013-02-07 17:05:57 -0800 | [diff] [blame] | 467 | # All text for proofreading (or running tools over): |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 468 | # ../out/target/common/docs/libcore-proofread.txt |
| 469 | # |
Elliott Hughes | 92fc63e | 2013-02-07 17:05:57 -0800 | [diff] [blame] | 470 | # TODO list of missing javadoc, etc: |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 471 | # ../out/target/common/docs/libcore-docs-todo.html |
| 472 | # |
| 473 | # Rerun: |
| 474 | # rm -rf ../out/target/common/docs/libcore-timestamp && mm -j32 libcore-docs |
| 475 | # |
| 476 | include $(CLEAR_VARS) |
Ying Wang | 21ac42d | 2013-12-04 15:54:36 -0800 | [diff] [blame] | 477 | |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 478 | # for shared defintion of libcore_to_document |
| 479 | include $(LOCAL_PATH)/Docs.mk |
| 480 | |
Neil Fuller | 4259738 | 2015-10-07 11:00:01 +0100 | [diff] [blame] | 481 | # The libcore_to_document paths are relative to $(TOPDIR). We are in libcore so we must prepend |
| 482 | # ../ to make LOCAL_SRC_FILES relative to $(LOCAL_PATH). |
| 483 | LOCAL_SRC_FILES := $(addprefix ../, $(libcore_to_document)) |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 484 | # rerun doc generation without recompiling the java |
Brian Carlstrom | dc3c152 | 2011-01-05 17:48:05 -0800 | [diff] [blame] | 485 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 486 | LOCAL_MODULE_CLASS:=JAVA_LIBRARIES |
| 487 | |
| 488 | LOCAL_MODULE := libcore |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 489 | |
Elliott Hughes | b986327 | 2012-11-08 14:28:29 -0800 | [diff] [blame] | 490 | LOCAL_DROIDDOC_OPTIONS := \ |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 491 | -offlinemode \ |
| 492 | -title "libcore" \ |
| 493 | -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \ |
| 494 | -todo ../$(LOCAL_MODULE)-docs-todo.html \ |
Neil Fuller | 7881b2c | 2016-10-14 16:26:46 +0100 | [diff] [blame] | 495 | -knowntags ./libcore/known_oj_tags.txt \ |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 496 | -hdf android.whichdoc offline |
| 497 | |
Scott Main | 7554309 | 2017-03-08 12:50:03 -0800 | [diff] [blame] | 498 | LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk |
Dan Bornstein | 6ac43c2 | 2009-10-24 15:33:49 -0700 | [diff] [blame] | 499 | |
| 500 | include $(BUILD_DROIDDOC) |
Colin Cross | 9762264 | 2017-09-21 23:32:23 +0000 | [diff] [blame] | 501 | |
| 502 | openjdk_java_files := |
| 503 | non_openjdk_java_files := |