blob: 4003aafb2a5a63eb4da56e10e6b62841141a7dc0 [file] [log] [blame]
Colin Cross8e404122014-02-06 14:45:37 -08001#
2# Copyright (C) 2008 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###########################################################
18## Standard rules for building an application package.
19##
20## Additional inputs from base_rules.make:
21## LOCAL_PACKAGE_NAME: The name of the package; the directory
22## will be called this.
23##
24## MODULE, MODULE_PATH, and MODULE_SUFFIX will
25## be set for you.
26###########################################################
27
28# If this makefile is being read from within an inheritance,
29# use the new values.
30skip_definition:=
31ifdef LOCAL_PACKAGE_OVERRIDES
32 package_overridden := $(call set-inherited-package-variables)
33 ifeq ($(strip $(package_overridden)),)
34 skip_definition := true
35 endif
36endif
37
38ifndef skip_definition
39
40LOCAL_PACKAGE_NAME := $(strip $(LOCAL_PACKAGE_NAME))
41ifeq ($(LOCAL_PACKAGE_NAME),)
42$(error $(LOCAL_PATH): Package modules must define LOCAL_PACKAGE_NAME)
43endif
44
45ifneq ($(strip $(LOCAL_MODULE_SUFFIX)),)
46$(error $(LOCAL_PATH): Package modules may not define LOCAL_MODULE_SUFFIX)
47endif
48LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
49
50ifneq ($(strip $(LOCAL_MODULE)),)
51$(error $(LOCAL_PATH): Package modules may not define LOCAL_MODULE)
52endif
53LOCAL_MODULE := $(LOCAL_PACKAGE_NAME)
54
Colin Cross8e404122014-02-06 14:45:37 -080055ifneq ($(strip $(LOCAL_MODULE_CLASS)),)
56$(error $(LOCAL_PATH): Package modules may not set LOCAL_MODULE_CLASS)
57endif
58LOCAL_MODULE_CLASS := APPS
59
Ying Wangdd71c852015-12-04 13:59:18 -080060intermediates := $(call local-intermediates-dir)
61intermediates.COMMON := $(call local-intermediates-dir,COMMON)
62
Yohann Rousseld2a76c12015-02-05 16:10:58 +010063#################################
64include $(BUILD_SYSTEM)/configure_local_jack.mk
65#################################
Yohann Roussel37822c42015-01-09 10:36:40 +010066
Colin Cross8e404122014-02-06 14:45:37 -080067# Package LOCAL_MODULE_TAGS default to optional
68LOCAL_MODULE_TAGS := $(strip $(LOCAL_MODULE_TAGS))
69ifeq ($(LOCAL_MODULE_TAGS),)
70LOCAL_MODULE_TAGS := optional
71endif
72
73ifeq ($(filter tests, $(LOCAL_MODULE_TAGS)),)
74# Force localization check if it's not tagged as tests.
75LOCAL_AAPT_FLAGS := $(LOCAL_AAPT_FLAGS) -z
76endif
77
Ying Wang4cb04992014-07-29 10:34:30 -070078need_compile_asset :=
Colin Cross8e404122014-02-06 14:45:37 -080079ifeq (,$(LOCAL_ASSET_DIR))
80LOCAL_ASSET_DIR := $(LOCAL_PATH)/assets
Ying Wang4cb04992014-07-29 10:34:30 -070081else
82need_compile_asset := true
Colin Cross8e404122014-02-06 14:45:37 -080083endif
84
Ying Wang61291922014-06-25 13:23:58 -070085# LOCAL_RESOURCE_DIR may point to resource generated during the build
86need_compile_res :=
Colin Cross8e404122014-02-06 14:45:37 -080087ifeq (,$(LOCAL_RESOURCE_DIR))
88 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
Ying Wang61291922014-06-25 13:23:58 -070089else
90 need_compile_res := true
Dan Willemsenfa7ecfb2017-05-02 23:55:44 -070091 LOCAL_RESOURCE_DIR := $(foreach d,$(LOCAL_RESOURCE_DIR),$(call clean-path,$(d)))
Colin Cross8e404122014-02-06 14:45:37 -080092endif
93
94package_resource_overlays := $(strip \
95 $(wildcard $(foreach dir, $(PRODUCT_PACKAGE_OVERLAYS), \
96 $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))) \
97 $(wildcard $(foreach dir, $(DEVICE_PACKAGE_OVERLAYS), \
98 $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))))
99
Jaekyun Seok30706102017-02-02 00:44:58 +0900100enforce_rro_enabled :=
Jaekyun Seok2a209992017-03-30 11:25:02 +0900101ifneq ($(PRODUCT_ENFORCE_RRO_TARGETS),)
102 ifneq ($(package_resource_overlays),)
103 ifeq ($(PRODUCT_ENFORCE_RRO_TARGETS),*)
104 enforce_rro_enabled := true
105 else ifneq (,$(filter $(LOCAL_PACKAGE_NAME), $(PRODUCT_ENFORCE_RRO_TARGETS)))
Jaekyun Seok30706102017-02-02 00:44:58 +0900106 enforce_rro_enabled := true
107 endif
108 endif
109
110 ifdef enforce_rro_enabled
111 ifeq (,$(LOCAL_MODULE_PATH))
112 ifeq (true,$(LOCAL_PROPRIETARY_MODULE))
113 enforce_rro_enabled :=
114 else ifeq (true,$(LOCAL_OEM_MODULE))
115 enforce_rro_enabled :=
116 else ifeq (true,$(LOCAL_ODM_MODULE))
117 enforce_rro_enabled :=
118 endif
119 else ifeq ($(filter $(TARGET_OUT)/%,$(LOCAL_MODULE_PATH)),)
120 enforce_rro_enabled :=
121 endif
122 endif
123endif
124
125ifndef enforce_rro_enabled
Colin Cross8e404122014-02-06 14:45:37 -0800126LOCAL_RESOURCE_DIR := $(package_resource_overlays) $(LOCAL_RESOURCE_DIR)
Jaekyun Seok30706102017-02-02 00:44:58 +0900127endif
Colin Cross8e404122014-02-06 14:45:37 -0800128
Colin Cross2c321442014-02-12 13:06:30 -0800129all_assets := $(strip \
130 $(foreach dir, $(LOCAL_ASSET_DIR), \
131 $(addprefix $(dir)/, \
132 $(patsubst assets/%,%, \
133 $(call find-subdir-assets, $(dir)) \
134 ) \
135 ) \
136 ))
Colin Cross8e404122014-02-06 14:45:37 -0800137
Ying Wang4cb04992014-07-29 10:34:30 -0700138ifneq ($(all_assets),)
139need_compile_asset := true
140endif
141
Adam Lesinskie758f932016-02-26 11:13:43 -0800142my_res_package :=
Ying Wange295c3d2016-02-24 14:11:55 -0800143ifdef LOCAL_USE_AAPT2
Ying Wangdd71c852015-12-04 13:59:18 -0800144# In aapt2 the last takes precedence.
145my_resource_dirs := $(call reverse-list,$(LOCAL_RESOURCE_DIR))
Adam Lesinskie758f932016-02-26 11:13:43 -0800146my_res_dir :=
147my_overlay_res_dirs :=
148
149ifneq ($(LOCAL_STATIC_ANDROID_LIBRARIES),)
150# If we are using static android libraries, every source file becomes an overlay.
151# This is to emulate old AAPT behavior which simulated library support.
152my_res_dir :=
153my_overlay_res_dirs := $(my_resource_dirs)
154else
155# Without static libraries, the first directory is our directory, which can then be
156# overlaid by the rest. (First directory in my_resource_dirs is last directory in
157# $(LOCAL_RESOURCE_DIR) due to it being reversed.
158my_res_dir := $(firstword $(my_resource_dirs))
159my_overlay_res_dirs := $(wordlist 2,999,$(my_resource_dirs))
160endif
161
Ying Wangdd71c852015-12-04 13:59:18 -0800162my_overlay_resources := $(strip \
Adam Lesinskie758f932016-02-26 11:13:43 -0800163 $(foreach d,$(my_overlay_res_dirs),\
Ying Wangdd71c852015-12-04 13:59:18 -0800164 $(addprefix $(d)/, \
165 $(call find-subdir-assets,$(d)))))
166
Colin Crossfe109632016-11-29 11:12:56 -0800167my_res_resources := $(if $(my_res_dir),$(strip \
Ying Wangdd71c852015-12-04 13:59:18 -0800168 $(addprefix $(my_res_dir)/, \
Colin Crossfe109632016-11-29 11:12:56 -0800169 $(call find-subdir-assets,$(my_res_dir)))))
Ying Wangdd71c852015-12-04 13:59:18 -0800170
171all_resources := $(strip $(my_res_resources) $(my_overlay_resources))
172
173# The linked resource package.
174my_res_package := $(intermediates)/package-res.apk
175LOCAL_INTERMEDIATE_TARGETS += $(my_res_package)
176
Ying Wange5853972016-03-01 12:06:47 -0800177# Always run aapt2, because we need to at least compile the AndroidManifest.xml.
Ying Wangdd71c852015-12-04 13:59:18 -0800178need_compile_res := true
179
Ying Wange295c3d2016-02-24 14:11:55 -0800180else # LOCAL_USE_AAPT2
Colin Cross8e404122014-02-06 14:45:37 -0800181all_resources := $(strip \
182 $(foreach dir, $(LOCAL_RESOURCE_DIR), \
183 $(addprefix $(dir)/, \
184 $(patsubst res/%,%, \
185 $(call find-subdir-assets,$(dir)) \
186 ) \
187 ) \
188 ))
189
Adam Lesinski4c452052016-08-12 12:57:17 -0700190ifdef LOCAL_PACKAGE_SPLITS
191LOCAL_AAPT_FLAGS += $(addprefix --split ,$(LOCAL_PACKAGE_SPLITS))
192endif
193
Ying Wange295c3d2016-02-24 14:11:55 -0800194endif # LOCAL_USE_AAPT2
Ying Wangdd71c852015-12-04 13:59:18 -0800195
Ying Wang61291922014-06-25 13:23:58 -0700196ifneq ($(all_resources),)
197 need_compile_res := true
198endif
199
Colin Cross8e404122014-02-06 14:45:37 -0800200all_res_assets := $(strip $(all_assets) $(all_resources))
201
Colin Cross8e404122014-02-06 14:45:37 -0800202# If no assets or resources were found, clear the directory variables so
203# we don't try to build them.
Ying Wang4cb04992014-07-29 10:34:30 -0700204ifneq (true,$(need_compile_asset))
Colin Cross8e404122014-02-06 14:45:37 -0800205LOCAL_ASSET_DIR:=
206endif
Ying Wang61291922014-06-25 13:23:58 -0700207ifneq (true,$(need_compile_res))
Colin Cross8e404122014-02-06 14:45:37 -0800208LOCAL_RESOURCE_DIR:=
209R_file_stamp :=
210else
211# Make sure that R_file_stamp inherits the proper PRIVATE vars.
212# If R.stamp moves, be sure to update the framework makefile,
213# which has intimate knowledge of its location.
Ying Wang98ae7982014-12-18 14:53:52 -0800214R_file_stamp := $(intermediates.COMMON)/src/R.stamp
Colin Cross8e404122014-02-06 14:45:37 -0800215LOCAL_INTERMEDIATE_TARGETS += $(R_file_stamp)
216endif
217
218LOCAL_BUILT_MODULE_STEM := package.apk
Ying Wangaf9757e2014-07-17 21:24:42 -0700219LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE).apk
Colin Cross8e404122014-02-06 14:45:37 -0800220
221LOCAL_PROGUARD_ENABLED:=$(strip $(LOCAL_PROGUARD_ENABLED))
222ifndef LOCAL_PROGUARD_ENABLED
223ifneq ($(DISABLE_PROGUARD),true)
224 LOCAL_PROGUARD_ENABLED :=full
225endif
226endif
227ifeq ($(LOCAL_PROGUARD_ENABLED),disabled)
228 # the package explicitly request to disable proguard.
229 LOCAL_PROGUARD_ENABLED :=
230endif
231proguard_options_file :=
232ifneq ($(LOCAL_PROGUARD_ENABLED),custom)
Ying Wang61291922014-06-25 13:23:58 -0700233ifeq ($(need_compile_res),true)
Ying Wang98ae7982014-12-18 14:53:52 -0800234 proguard_options_file := $(intermediates.COMMON)/proguard_options
Ying Wang61291922014-06-25 13:23:58 -0700235endif # need_compile_res
Colin Cross8e404122014-02-06 14:45:37 -0800236endif # !custom
237LOCAL_PROGUARD_FLAGS := $(addprefix -include ,$(proguard_options_file)) $(LOCAL_PROGUARD_FLAGS)
238
Colin Cross79e2f732016-12-21 14:29:13 -0800239ifdef LOCAL_JACK_ENABLED
Yohann Rousselb4c49cb2014-09-08 14:45:14 +0200240ifndef LOCAL_JACK_PROGUARD_FLAGS
241 LOCAL_JACK_PROGUARD_FLAGS := $(LOCAL_PROGUARD_FLAGS)
242endif
243LOCAL_JACK_PROGUARD_FLAGS := $(addprefix -include ,$(proguard_options_file)) $(LOCAL_JACK_PROGUARD_FLAGS)
Colin Cross79e2f732016-12-21 14:29:13 -0800244endif # LOCAL_JACK_ENABLED
Yohann Rousselb4c49cb2014-09-08 14:45:14 +0200245
Colin Cross8e404122014-02-06 14:45:37 -0800246ifeq (true,$(EMMA_INSTRUMENT))
247ifndef LOCAL_EMMA_INSTRUMENT
248# No emma for test apks.
Ying Wang324ffb22015-11-06 11:22:28 -0800249ifeq (,$(LOCAL_INSTRUMENTATION_FOR))
Colin Cross8e404122014-02-06 14:45:37 -0800250LOCAL_EMMA_INSTRUMENT := true
251endif # No test apk
252endif # LOCAL_EMMA_INSTRUMENT is not set
253else
254LOCAL_EMMA_INSTRUMENT := false
255endif # EMMA_INSTRUMENT is true
256
257ifeq (true,$(LOCAL_EMMA_INSTRUMENT))
258ifeq (true,$(EMMA_INSTRUMENT_STATIC))
Colin Cross79e2f732016-12-21 14:29:13 -0800259ifdef LOCAL_JACK_ENABLED
Sebastien Hertzdfce8ad2015-11-19 17:53:00 +0100260# Jack supports coverage with Jacoco
Colin Cross79e2f732016-12-21 14:29:13 -0800261ifneq ($(LOCAL_SRC_FILES)$(LOCAL_STATIC_JAVA_LIBRARIES)$(LOCAL_SOURCE_FILES_ALL_GENERATED),)
262# Only add jacocoagent if the package contains some java code
Sebastien Hertzdfce8ad2015-11-19 17:53:00 +0100263LOCAL_STATIC_JAVA_LIBRARIES += jacocoagent
Colin Cross79e2f732016-12-21 14:29:13 -0800264endif # Contains java code
265else
266LOCAL_STATIC_JAVA_LIBRARIES += emma
267endif # LOCAL_JACK_ENABLED
268else
Colin Cross8e404122014-02-06 14:45:37 -0800269ifdef LOCAL_SDK_VERSION
270ifdef TARGET_BUILD_APPS
Sebastien Hertz2319e562016-03-31 16:48:26 +0200271# In unbundled build, merge the coverage library into the apk.
Colin Cross79e2f732016-12-21 14:29:13 -0800272ifdef LOCAL_JACK_ENABLED
Sebastien Hertzdfce8ad2015-11-19 17:53:00 +0100273# Jack supports coverage with Jacoco
Colin Cross79e2f732016-12-21 14:29:13 -0800274ifneq ($(LOCAL_SRC_FILES)$(LOCAL_STATIC_JAVA_LIBRARIES)$(LOCAL_SOURCE_FILES_ALL_GENERATED),)
275# Only add jacocoagent if the package contains some java code
Sebastien Hertzdfce8ad2015-11-19 17:53:00 +0100276LOCAL_STATIC_JAVA_LIBRARIES += jacocoagent
Sebastien Hertz2319e562016-03-31 16:48:26 +0200277# Exclude jacoco classes from proguard
278LOCAL_PROGUARD_FLAGS += -include $(BUILD_SYSTEM)/proguard.jacoco.flags
279LOCAL_JACK_PROGUARD_FLAGS += -include $(BUILD_SYSTEM)/proguard.jacoco.flags
Colin Cross79e2f732016-12-21 14:29:13 -0800280endif # Contains java code
281else # ! LOCAL_JACK_ENABLED
282LOCAL_STATIC_JAVA_LIBRARIES += emma
283endif # ! LOCAL_JACK_ENABLED
284else # ! TARGET_BUILD_APPS
285ifdef LOCAL_JACK_ENABLED
Sebastien Hertz2319e562016-03-31 16:48:26 +0200286# If build against the SDK in full build, core.jar is not used
287# so coverage classes are not present.
288# Jack needs jacoco on the classpath but we do not want it to be in
289# the final apk. While it is a static library, we add it to the
290# LOCAL_JAVA_LIBRARIES which are only present on the classpath.
291# Note: we have nothing to do for proguard since jacoco will be
292# on the classpath only, thus not modified during the compilation.
293LOCAL_JAVA_LIBRARIES += jacocoagent
Colin Cross79e2f732016-12-21 14:29:13 -0800294else # ! LOCAL_JACK_ENABLED
295# If build against the SDK in full build, core.jar is not used,
296# we have to use prebiult emma.jar to make Proguard happy;
297# Otherwise emma classes are included in core.jar.
298LOCAL_PROGUARD_FLAGS += -libraryjars $(EMMA_JAR)
299endif # ! LOCAL_JACK_ENABLED
300endif # ! TARGET_BUILD_APPS
Colin Cross8e404122014-02-06 14:45:37 -0800301endif # LOCAL_SDK_VERSION
Colin Cross79e2f732016-12-21 14:29:13 -0800302endif # EMMA_INSTRUMENT_STATIC
Colin Cross8e404122014-02-06 14:45:37 -0800303endif # LOCAL_EMMA_INSTRUMENT
304
305rs_compatibility_jni_libs :=
306
Ying Wanged0361f2015-04-19 09:55:39 -0700307ifeq ($(LOCAL_DATA_BINDING),true)
308data_binding_intermediates := $(intermediates.COMMON)/data-binding
309
310LOCAL_JAVACFLAGS += -processorpath $(DATA_BINDING_COMPILER) -s $(data_binding_intermediates)/anno-src
311LOCAL_JACK_FLAGS += --processorpath $(DATA_BINDING_COMPILER)
312
313LOCAL_STATIC_JAVA_LIBRARIES += databinding-baselibrary
314LOCAL_STATIC_JAVA_AAR_LIBRARIES += databinding-library databinding-adapters
315
316data_binding_res_in := $(LOCAL_RESOURCE_DIR)
317data_binding_res_out := $(data_binding_intermediates)/res
318
319# Replace with the processed merged res dir.
320LOCAL_RESOURCE_DIR := $(data_binding_res_out)
321
322LOCAL_AAPT_FLAGS += --auto-add-overlay --extra-packages com.android.databinding.library
323endif # LOCAL_DATA_BINDING
324
Ying Wange9dd9f22014-10-29 15:48:32 -0700325include $(BUILD_SYSTEM)/android_manifest.mk
326
Colin Cross8e404122014-02-06 14:45:37 -0800327#################################
328include $(BUILD_SYSTEM)/java.mk
329#################################
330
331LOCAL_SDK_RES_VERSION:=$(strip $(LOCAL_SDK_RES_VERSION))
332ifeq ($(LOCAL_SDK_RES_VERSION),)
333 LOCAL_SDK_RES_VERSION:=$(LOCAL_SDK_VERSION)
334endif
335
Colin Cross8e404122014-02-06 14:45:37 -0800336$(LOCAL_INTERMEDIATE_TARGETS): \
337 PRIVATE_ANDROID_MANIFEST := $(full_android_manifest)
Colin Cross8e404122014-02-06 14:45:37 -0800338
Ying Wanged0361f2015-04-19 09:55:39 -0700339ifeq ($(LOCAL_DATA_BINDING),true)
340data_binding_stamp := $(data_binding_intermediates)/data-binding.stamp
341$(data_binding_stamp): PRIVATE_INTERMEDIATES := $(data_binding_intermediates)
342$(data_binding_stamp): PRIVATE_MANIFEST := $(full_android_manifest)
343# Generate code into $(LOCAL_INTERMEDIATE_SOURCE_DIR) so that the generated .java files
344# will be automatically picked up by function compile-java.
345$(data_binding_stamp): PRIVATE_SRC_OUT := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/data-binding
346$(data_binding_stamp): PRIVATE_XML_OUT := $(data_binding_intermediates)/xml
347$(data_binding_stamp): PRIVATE_RES_OUT := $(data_binding_res_out)
348$(data_binding_stamp): PRIVATE_RES_IN := $(data_binding_res_in)
349$(data_binding_stamp): PRIVATE_ANNO_SRC_DIR := $(data_binding_intermediates)/anno-src
350
351$(data_binding_stamp) : $(all_res_assets) $(full_android_manifest) \
352 $(DATA_BINDING_COMPILER)
353 @echo "Data-binding process: $@"
354 @rm -rf $(PRIVATE_INTERMEDIATES) $(PRIVATE_SRC_OUT) && \
355 mkdir -p $(PRIVATE_INTERMEDIATES) $(PRIVATE_SRC_OUT) \
356 $(PRIVATE_XML_OUT) $(PRIVATE_RES_OUT) $(PRIVATE_ANNO_SRC_DIR)
357 $(hide) java -classpath $(DATA_BINDING_COMPILER) android.databinding.tool.MakeCopy \
358 $(PRIVATE_MANIFEST) $(PRIVATE_SRC_OUT) $(PRIVATE_XML_OUT) $(PRIVATE_RES_OUT) $(PRIVATE_RES_IN)
359 $(hide) touch $@
360
361# Make sure the data-binding process happens before javac and generation of R.java.
362$(R_file_stamp) $(full_classes_compiled_jar) : $(data_binding_stamp)
363# The dependency path when jack is enabled
364$(built_dex_intermediate) : $(data_binding_stamp)
365endif # LOCAL_DATA_BINDING
366
Ying Wang61291922014-06-25 13:23:58 -0700367ifeq ($(need_compile_res),true)
Adam Lesinski4c452052016-08-12 12:57:17 -0700368
369###############################
370## APK splits
371built_apk_splits :=
372installed_apk_splits :=
373my_apk_split_configs :=
374
375ifdef LOCAL_PACKAGE_SPLITS
376my_apk_split_configs := $(LOCAL_PACKAGE_SPLITS)
377my_split_suffixes := $(subst $(comma),_,$(my_apk_split_configs))
Dan Willemsenf72308a2017-05-15 23:38:04 -0700378built_apk_splits := $(foreach s,$(my_split_suffixes),$(intermediates)/package_$(s).apk)
Adam Lesinski4c452052016-08-12 12:57:17 -0700379installed_apk_splits := $(foreach s,$(my_split_suffixes),$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
380endif
381
Ying Wange295c3d2016-02-24 14:11:55 -0800382ifdef LOCAL_USE_AAPT2
Ying Wangdd71c852015-12-04 13:59:18 -0800383my_compiled_res_base_dir := $(intermediates)/flat-res
Yang Nie2c09012017-04-26 16:15:42 -0700384renderscript_target_api :=
385ifneq (,$(LOCAL_RENDERSCRIPT_TARGET_API))
386renderscript_target_api := $(LOCAL_RENDERSCRIPT_TARGET_API)
387else
388ifneq (,$(LOCAL_SDK_VERSION))
389# Set target-api for LOCAL_SDK_VERSIONs other than current.
390ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
391renderscript_target_api := $(LOCAL_SDK_VERSION)
392endif
393endif # LOCAL_SDK_VERSION is set
394endif # LOCAL_RENDERSCRIPT_TARGET_API is set
395ifneq (,$(renderscript_target_api))
396ifneq ($(call math_gt_or_eq,$(renderscript_target_api),21),true)
Ying Wange295c3d2016-02-24 14:11:55 -0800397my_generated_res_dirs := $(rs_generated_res_dir)
398my_generated_res_dirs_deps := $(RenderScript_file_stamp)
Yang Nie2c09012017-04-26 16:15:42 -0700399endif # renderscript_target_api < 21
400endif # renderscript_target_api is set
Adam Lesinski981de832017-03-16 04:53:05 +0000401my_asset_dirs := $(LOCAL_ASSET_DIR)
402my_full_asset_paths := $(all_assets)
Adam Lesinskie758f932016-02-26 11:13:43 -0800403# Add AAPT2 link specific flags.
404$(my_res_package): PRIVATE_AAPT_FLAGS := $(LOCAL_AAPT_FLAGS) --no-static-lib-packages
Ying Wangdd71c852015-12-04 13:59:18 -0800405include $(BUILD_SYSTEM)/aapt2.mk
Ying Wange295c3d2016-02-24 14:11:55 -0800406else # LOCAL_USE_AAPT2
Colin Cross8e404122014-02-06 14:45:37 -0800407
408# Since we don't know where the real R.java file is going to end up,
409# we need to use another file to stand in its place. We'll just
410# copy the generated file to src/R.stamp, which means it will
411# have the same contents and timestamp as the actual file.
412#
413# At the same time, this will copy the R.java file to a central
414# 'R' directory to make it easier to add the files to an IDE.
415#
Colin Cross8e404122014-02-06 14:45:37 -0800416
417$(R_file_stamp): PRIVATE_RESOURCE_PUBLICS_OUTPUT := \
418 $(intermediates.COMMON)/public_resources.xml
419$(R_file_stamp): PRIVATE_PROGUARD_OPTIONS_FILE := $(proguard_options_file)
420$(R_file_stamp): $(all_res_assets) $(full_android_manifest) $(RenderScript_file_stamp) $(AAPT) | $(ACP)
421 @echo "target R.java/Manifest.java: $(PRIVATE_MODULE) ($@)"
Martin Arenlindfb6985e2015-09-15 15:52:56 +0200422 @rm -rf $@ && mkdir -p $(dir $@)
Colin Cross8e404122014-02-06 14:45:37 -0800423 $(create-resource-java-files)
Ying Wangdd71c852015-12-04 13:59:18 -0800424 $(call find-generated-R.java)
Colin Cross8e404122014-02-06 14:45:37 -0800425
426$(proguard_options_file): $(R_file_stamp)
427
Ying Wangdbe23f52014-03-25 14:42:46 -0700428resource_export_package :=
Colin Cross8e404122014-02-06 14:45:37 -0800429ifdef LOCAL_EXPORT_PACKAGE_RESOURCES
430# Put this module's resources into a PRODUCT-agnositc package that
431# other packages can use to build their own PRODUCT-agnostic R.java (etc.)
432# files.
433resource_export_package := $(intermediates.COMMON)/package-export.apk
434$(R_file_stamp): $(resource_export_package)
435
436# add-assets-to-package looks at PRODUCT_AAPT_CONFIG, but this target
437# can't know anything about PRODUCT. Clear it out just for this target.
438$(resource_export_package): PRIVATE_PRODUCT_AAPT_CONFIG :=
439$(resource_export_package): PRIVATE_PRODUCT_AAPT_PREF_CONFIG :=
440$(resource_export_package): $(all_res_assets) $(full_android_manifest) $(RenderScript_file_stamp) $(AAPT)
441 @echo "target Export Resources: $(PRIVATE_MODULE) ($@)"
442 $(create-empty-package)
443 $(add-assets-to-package)
444endif
445
Ying Wange295c3d2016-02-24 14:11:55 -0800446endif # LOCAL_USE_AAPT2
Ying Wangdd71c852015-12-04 13:59:18 -0800447
Colin Cross8e404122014-02-06 14:45:37 -0800448# Other modules should depend on the BUILT module if
449# they want to use this module's R.java file.
Colin Cross79e2f732016-12-21 14:29:13 -0800450$(LOCAL_BUILT_MODULE): $(R_file_stamp)
451
452ifdef LOCAL_JACK_ENABLED
453ifneq ($(built_dex_intermediate),)
454$(built_dex_intermediate): $(R_file_stamp)
455endif
456ifneq ($(noshrob_classes_jack),)
457$(noshrob_classes_jack): $(R_file_stamp)
458endif
459ifneq ($(full_classes_jack),)
460$(full_classes_jack): $(R_file_stamp)
461$(jack_check_timestamp): $(R_file_stamp)
462endif
463endif # LOCAL_JACK_ENABLED
464
465ifneq ($(full_classes_jar),)
466# If full_classes_jar is non-empty, we're building sources.
467# If we're building sources, the initial javac step (which
468# produces full_classes_compiled_jar) needs to ensure the
469# R.java and Manifest.java files have been generated first.
470$(full_classes_compiled_jar): $(R_file_stamp)
471endif
Colin Cross8e404122014-02-06 14:45:37 -0800472
Ying Wang61291922014-06-25 13:23:58 -0700473endif # need_compile_res
Colin Cross8e404122014-02-06 14:45:37 -0800474
475ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
476# We need to explicitly clear this var so that we don't
477# inherit the value from whomever caused us to be built.
478$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_AAPT_INCLUDES :=
479else
480# Most packages should link against the resources defined by framework-res.
481# Even if they don't have their own resources, they may use framework
482# resources.
Michael Wright0fb087f2015-11-06 15:20:51 +0000483ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_RES_VERSION))),)
Colin Cross8e404122014-02-06 14:45:37 -0800484# for released sdk versions, the platform resources were built into android.jar.
485framework_res_package_export := \
486 $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
487framework_res_package_export_deps := $(framework_res_package_export)
488else # LOCAL_SDK_RES_VERSION
489framework_res_package_export := \
490 $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
491# We can't depend directly on the export.apk file; it won't get its
492# PRIVATE_ vars set up correctly if we do. Instead, depend on the
493# corresponding R.stamp file, which lists the export.apk as a dependency.
494framework_res_package_export_deps := \
495 $(dir $(framework_res_package_export))src/R.stamp
496endif # LOCAL_SDK_RES_VERSION
Adam Lesinskide057c32014-03-13 18:48:27 -0700497all_library_res_package_exports := \
498 $(framework_res_package_export) \
Adam Lesinski5eebe0f2014-03-25 15:45:34 -0700499 $(foreach lib,$(LOCAL_RES_LIBRARIES),\
Adam Lesinskide057c32014-03-13 18:48:27 -0700500 $(call intermediates-dir-for,APPS,$(lib),,COMMON)/package-export.apk)
501
502all_library_res_package_export_deps := \
503 $(framework_res_package_export_deps) \
Adam Lesinski5eebe0f2014-03-25 15:45:34 -0700504 $(foreach lib,$(LOCAL_RES_LIBRARIES),\
Adam Lesinskide057c32014-03-13 18:48:27 -0700505 $(call intermediates-dir-for,APPS,$(lib),,COMMON)/src/R.stamp)
Ying Wangb5745642014-06-19 16:07:30 -0700506$(resource_export_package) $(R_file_stamp) $(LOCAL_BUILT_MODULE): $(all_library_res_package_export_deps)
Colin Cross8e404122014-02-06 14:45:37 -0800507$(LOCAL_INTERMEDIATE_TARGETS): \
Adam Lesinskide057c32014-03-13 18:48:27 -0700508 PRIVATE_AAPT_INCLUDES := $(all_library_res_package_exports)
Ying Wangdd71c852015-12-04 13:59:18 -0800509
Ying Wange295c3d2016-02-24 14:11:55 -0800510ifdef LOCAL_USE_AAPT2
Ying Wangdd71c852015-12-04 13:59:18 -0800511$(my_res_package) : $(all_library_res_package_export_deps)
512endif
Colin Cross8e404122014-02-06 14:45:37 -0800513endif # LOCAL_NO_STANDARD_LIBRARIES
514
515ifneq ($(full_classes_jar),)
516$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(built_dex)
Colin Cross79e2f732016-12-21 14:29:13 -0800517# Use the jarjar processed arhive as the initial package file.
Colin Crossffbf0a62017-03-29 12:58:15 -0700518$(LOCAL_BUILT_MODULE): PRIVATE_SOURCE_ARCHIVE := $(full_classes_pre_proguard_jar)
Colin Cross8e404122014-02-06 14:45:37 -0800519$(LOCAL_BUILT_MODULE): $(built_dex)
Ying Wang33360dd2015-01-14 14:23:56 -0800520else
521$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE :=
Colin Cross79e2f732016-12-21 14:29:13 -0800522$(LOCAL_BUILT_MODULE): PRIVATE_SOURCE_ARCHIVE :=
Colin Cross8e404122014-02-06 14:45:37 -0800523endif # full_classes_jar
524
Ying Wang96bcad42014-04-17 13:38:04 -0700525include $(BUILD_SYSTEM)/install_jni_libs.mk
Colin Cross8e404122014-02-06 14:45:37 -0800526
527# Pick a key to sign the package with. If this package hasn't specified
528# an explicit certificate, use the default.
529# Secure release builds will have their packages signed after the fact,
530# so it's ok for these private keys to be in the clear.
531ifeq ($(LOCAL_CERTIFICATE),)
532 LOCAL_CERTIFICATE := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
533endif
534
535ifeq ($(LOCAL_CERTIFICATE),EXTERNAL)
536 # The special value "EXTERNAL" means that we will sign it with the
537 # default devkey, apply predexopt, but then expect the final .apk
538 # (after dexopting) to be signed by an outside tool.
539 LOCAL_CERTIFICATE := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
540 PACKAGES.$(LOCAL_PACKAGE_NAME).EXTERNAL_KEY := 1
541endif
542
543# If this is not an absolute certificate, assign it to a generic one.
544ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./)
545 LOCAL_CERTIFICATE := $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))$(LOCAL_CERTIFICATE)
546endif
547private_key := $(LOCAL_CERTIFICATE).pk8
548certificate := $(LOCAL_CERTIFICATE).x509.pem
Shinichiro Hamaji641e61c2016-05-13 16:03:24 +0900549additional_certificates := $(foreach c,$(LOCAL_ADDITIONAL_CERTIFICATES), $(c).x509.pem $(c).pk8)
Colin Cross8e404122014-02-06 14:45:37 -0800550
551$(LOCAL_BUILT_MODULE): $(private_key) $(certificate) $(SIGNAPK_JAR)
552$(LOCAL_BUILT_MODULE): PRIVATE_PRIVATE_KEY := $(private_key)
553$(LOCAL_BUILT_MODULE): PRIVATE_CERTIFICATE := $(certificate)
554
555PACKAGES.$(LOCAL_PACKAGE_NAME).PRIVATE_KEY := $(private_key)
556PACKAGES.$(LOCAL_PACKAGE_NAME).CERTIFICATE := $(certificate)
557
Shinichiro Hamaji641e61c2016-05-13 16:03:24 +0900558$(LOCAL_BUILT_MODULE): $(additional_certificates)
559$(LOCAL_BUILT_MODULE): PRIVATE_ADDITIONAL_CERTIFICATES := $(additional_certificates)
Colin Cross8e404122014-02-06 14:45:37 -0800560
561# Define the rule to build the actual package.
Ying Wang8e20ef62014-06-24 20:01:52 -0700562# PRIVATE_JNI_SHARED_LIBRARIES is a list of <abi>:<path_of_built_lib>.
563$(LOCAL_BUILT_MODULE): PRIVATE_JNI_SHARED_LIBRARIES := $(jni_shared_libraries_with_abis)
564# PRIVATE_JNI_SHARED_LIBRARIES_ABI is a list of ABI names.
565$(LOCAL_BUILT_MODULE): PRIVATE_JNI_SHARED_LIBRARIES_ABI := $(jni_shared_libraries_abis)
Colin Cross8e404122014-02-06 14:45:37 -0800566ifneq ($(TARGET_BUILD_APPS),)
567 # Include all resources for unbundled apps.
568 LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true
569endif
570ifeq ($(LOCAL_AAPT_INCLUDE_ALL_RESOURCES),true)
Adam Lesinskie758f932016-02-26 11:13:43 -0800571 $(my_res_package) $(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_CONFIG :=
572 $(my_res_package) $(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_PREF_CONFIG :=
Colin Cross8e404122014-02-06 14:45:37 -0800573else
Adam Lesinskie758f932016-02-26 11:13:43 -0800574 $(my_res_package) $(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_CONFIG := $(PRODUCT_AAPT_CONFIG)
Ying Wang934008f2014-07-30 13:40:14 -0700575ifdef LOCAL_PACKAGE_SPLITS
Adam Lesinskie758f932016-02-26 11:13:43 -0800576 $(my_res_package) $(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_PREF_CONFIG :=
Ying Wang934008f2014-07-30 13:40:14 -0700577else
Adam Lesinskie758f932016-02-26 11:13:43 -0800578 $(my_res_package) $(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_PREF_CONFIG := $(PRODUCT_AAPT_PREF_CONFIG)
Colin Cross8e404122014-02-06 14:45:37 -0800579endif
Ying Wang934008f2014-07-30 13:40:14 -0700580endif
Colin Cross79e2f732016-12-21 14:29:13 -0800581$(LOCAL_BUILT_MODULE): PRIVATE_DONT_DELETE_JAR_DIRS := $(LOCAL_DONT_DELETE_JAR_DIRS)
Ying Wangdd71c852015-12-04 13:59:18 -0800582$(LOCAL_BUILT_MODULE) : $(jni_shared_libraries)
Ying Wange295c3d2016-02-24 14:11:55 -0800583ifdef LOCAL_USE_AAPT2
Ying Wangdd71c852015-12-04 13:59:18 -0800584$(LOCAL_BUILT_MODULE): PRIVATE_RES_PACKAGE := $(my_res_package)
585$(LOCAL_BUILT_MODULE) : $(my_res_package) $(AAPT2) | $(ACP)
586else
587$(LOCAL_BUILT_MODULE) : $(all_res_assets) $(full_android_manifest) $(AAPT)
588endif
Colin Cross8e404122014-02-06 14:45:37 -0800589 @echo "target Package: $(PRIVATE_MODULE) ($@)"
Ying Wange295c3d2016-02-24 14:11:55 -0800590ifdef LOCAL_USE_AAPT2
Ying Wangdd71c852015-12-04 13:59:18 -0800591 $(call copy-file-to-new-target)
Ying Wang81ef4712016-03-31 10:10:42 -0700592else # ! LOCAL_USE_AAPT2
Colin Cross79e2f732016-12-21 14:29:13 -0800593ifdef LOCAL_JACK_ENABLED
Colin Cross8e404122014-02-06 14:45:37 -0800594 $(create-empty-package)
Colin Cross79e2f732016-12-21 14:29:13 -0800595else
596 $(if $(PRIVATE_SOURCE_ARCHIVE),\
597 $(call initialize-package-file,$(PRIVATE_SOURCE_ARCHIVE),$@),\
598 $(create-empty-package))
599endif
Colin Cross8e404122014-02-06 14:45:37 -0800600 $(add-assets-to-package)
Ying Wange295c3d2016-02-24 14:11:55 -0800601endif # LOCAL_USE_AAPT2
Colin Cross8e404122014-02-06 14:45:37 -0800602ifneq ($(jni_shared_libraries),)
603 $(add-jni-shared-libs-to-package)
604endif
Ying Wang8b27d182015-03-27 11:07:17 -0700605ifeq ($(full_classes_jar),)
606# We don't build jar, need to add the Java resources here.
607 $(if $(PRIVATE_EXTRA_JAR_ARGS),$(call add-java-resources-to,$@))
Ying Wang3a61eeb2016-03-11 10:32:01 -0800608else # full_classes_jar
Colin Cross8e404122014-02-06 14:45:37 -0800609 $(add-dex-to-package)
Ying Wang3a61eeb2016-03-11 10:32:01 -0800610endif # full_classes_jar
Colin Cross79e2f732016-12-21 14:29:13 -0800611ifdef LOCAL_JACK_ENABLED
Yohann Rousselb4c49cb2014-09-08 14:45:14 +0200612 $(add-carried-jack-resources)
Colin Cross79e2f732016-12-21 14:29:13 -0800613endif
Colin Cross8e404122014-02-06 14:45:37 -0800614ifdef LOCAL_DEX_PREOPT
Ying Wang3a61eeb2016-03-11 10:32:01 -0800615ifneq ($(BUILD_PLATFORM_ZIP),)
616 @# Keep a copy of apk with classes.dex unstripped
617 $(hide) cp -f $@ $(dir $@)package.dex.apk
618endif # BUILD_PLATFORM_ZIP
Colin Cross8e404122014-02-06 14:45:37 -0800619ifneq (nostripping,$(LOCAL_DEX_PREOPT))
620 $(call dexpreopt-remove-classes.dex,$@)
621endif
622endif
Kenny Rootdff37552015-04-15 12:09:32 -0700623 $(sign-package)
Colin Cross8e404122014-02-06 14:45:37 -0800624
Ying Wang36142f62014-05-21 16:13:33 -0700625###############################
Ying Wang8070b202014-12-01 17:46:56 -0800626## Build dpi-specific apks, if it's apps_only build.
627ifdef TARGET_BUILD_APPS
628ifdef LOCAL_DPI_VARIANTS
629$(foreach d, $(LOCAL_DPI_VARIANTS), \
630 $(eval my_dpi := $(d)) \
631 $(eval include $(BUILD_SYSTEM)/dpi_specific_apk.mk))
632endif
633endif
634
635###############################
Ying Wang36142f62014-05-21 16:13:33 -0700636## Rule to build the odex file
637ifdef LOCAL_DEX_PREOPT
638$(built_odex): PRIVATE_DEX_FILE := $(built_dex)
Ying Wangdb48da72014-09-13 11:26:39 -0700639# Use pattern rule - we may have multiple built odex files.
640$(built_odex) : $(dir $(LOCAL_BUILT_MODULE))% : $(built_dex)
Ying Wang994c2262014-05-28 13:34:59 -0700641 $(hide) mkdir -p $(dir $@) && rm -f $@
Ying Wang36142f62014-05-21 16:13:33 -0700642 $(add-dex-to-package)
643 $(hide) mv $@ $@.input
644 $(call dexpreopt-one-file,$@.input,$@)
645 $(hide) rm $@.input
646endif
647
Ying Wang1425e2d2014-07-22 15:42:11 -0700648###############################
649## APK splits
650ifdef LOCAL_PACKAGE_SPLITS
Ying Wang7f625aa2014-07-23 10:27:57 -0700651# The splits should have been built in the same command building the base apk.
Alex Klyubin5b826ac2015-12-04 10:07:41 -0800652# This rule just runs signing.
Ying Wang7f625aa2014-07-23 10:27:57 -0700653# Note that we explicily check the existence of the split apk and remove the
654# built base apk if the split apk isn't there.
655# That way the build system will rerun the aapt after the user changes the splitting parameters.
Ying Wang1425e2d2014-07-22 15:42:11 -0700656$(built_apk_splits): PRIVATE_PRIVATE_KEY := $(private_key)
657$(built_apk_splits): PRIVATE_CERTIFICATE := $(certificate)
Dan Willemsenf72308a2017-05-15 23:38:04 -0700658$(built_apk_splits) : $(intermediates)/%.apk : $(LOCAL_BUILT_MODULE)
Ying Wang7f625aa2014-07-23 10:27:57 -0700659 $(hide) if [ ! -f $@ ]; then \
660 echo 'No $@ generated, check your apk splitting parameters.' 1>&2; \
661 rm $<; exit 1; \
662 fi
663 $(sign-package)
Ying Wang1425e2d2014-07-22 15:42:11 -0700664
665# Rules to install the splits
Dan Willemsenf72308a2017-05-15 23:38:04 -0700666$(installed_apk_splits) : $(my_module_path)/$(LOCAL_MODULE)_%.apk : $(intermediates)/package_%.apk
Ying Wang7f625aa2014-07-23 10:27:57 -0700667 @echo "Install: $@"
668 $(copy-file-to-new-target)
Ying Wang1425e2d2014-07-22 15:42:11 -0700669
670# Register the additional built and installed files.
671ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits)
672ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \
Dan Willemsenf72308a2017-05-15 23:38:04 -0700673 $(foreach s,$(my_split_suffixes),$(intermediates)/package_$(s).apk:$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
Ying Wang1425e2d2014-07-22 15:42:11 -0700674
675# Make sure to install the splits when you run "make <module_name>".
Colin Cross33886702016-09-20 16:01:28 -0700676$(my_all_targets): $(installed_apk_splits)
Ying Wang16243612015-06-03 12:43:50 -0700677
678ifdef LOCAL_COMPATIBILITY_SUITE
Ying Wang16243612015-06-03 12:43:50 -0700679
Simran Basi6bea37c2017-02-16 18:04:10 -0800680$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
681 $(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
682 $(foreach s,$(my_split_suffixes),\
Dan Willemsenf72308a2017-05-15 23:38:04 -0700683 $(intermediates)/package_$(s).apk:$(dir)/$(LOCAL_MODULE)_$(s).apk))))
Ying Wang16243612015-06-03 12:43:50 -0700684
Simran Basi6bea37c2017-02-16 18:04:10 -0800685$(call create-suite-dependencies)
686
Ying Wang16243612015-06-03 12:43:50 -0700687endif # LOCAL_COMPATIBILITY_SUITE
Ying Wang1425e2d2014-07-22 15:42:11 -0700688endif # LOCAL_PACKAGE_SPLITS
689
Colin Cross8e404122014-02-06 14:45:37 -0800690# Save information about this package
691PACKAGES.$(LOCAL_PACKAGE_NAME).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
692PACKAGES.$(LOCAL_PACKAGE_NAME).RESOURCE_FILES := $(all_resources)
Colin Cross8e404122014-02-06 14:45:37 -0800693
694PACKAGES := $(PACKAGES) $(LOCAL_PACKAGE_NAME)
695
Colin Cross8e404122014-02-06 14:45:37 -0800696endif # skip_definition
697
698# Reset internal variables.
699all_res_assets :=
Jaekyun Seok30706102017-02-02 00:44:58 +0900700
701ifdef enforce_rro_enabled
702 ifdef LOCAL_EXPORT_PACKAGE_RESOURCES
703 enforce_rro_use_res_lib := true
704 else
705 enforce_rro_use_res_lib := false
706 endif
707
708 ifdef LOCAL_MANIFEST_PACKAGE_NAME
709 enforce_rro_is_manifest_package_name := true
710 enforce_rro_manifest_package_info := $(LOCAL_MANIFEST_PACKAGE_NAME)
711 else
712 enforce_rro_is_manifest_package_name := false
713 enforce_rro_manifest_package_info := $(full_android_manifest)
714 endif
715
716$(call append_enforce_rro_sources, \
717 $(my_register_name), \
718 $(enforce_rro_is_manifest_package_name), \
719 $(enforce_rro_manifest_package_info), \
720 $(enforce_rro_use_res_lib), \
721 $(package_resource_overlays) \
722 )
Jaekyun Seok2a209992017-03-30 11:25:02 +0900723endif # enforce_rro_enabled