blob: ab9338e1ef6e834c6a0d047eae5242439efecdc0 [file] [log] [blame]
The Android Open Source Project64100b32009-03-03 19:31:44 -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#
Jaesung Chung3497f7a2017-10-31 14:11:59 +090016ifeq (,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO))
17
The Android Open Source Project64100b32009-03-03 19:31:44 -080018LOCAL_PATH := $(my-dir)
19include $(CLEAR_VARS)
20
21#
22# Define rules to build temp_layoutlib.jar, which contains a subset of
23# the classes in framework.jar. The layoutlib_create tool is used to
24# transform the framework jar into the temp_layoutlib jar.
25#
26
27# We need to process the framework classes.jar file, but we can't
28# depend directly on it (private vars won't be inherited correctly).
29# So, we depend on framework's BUILT file.
Ying Wang29a0cff2014-07-21 14:40:42 -070030built_framework_dep := $(call java-lib-deps,framework)
31built_framework_classes := $(call java-lib-files,framework)
The Android Open Source Project64100b32009-03-03 19:31:44 -080032
Brian Carlstrom4fb9efc2014-06-18 15:11:01 -070033built_core_dep := $(call java-lib-deps,core-libart)
34built_core_classes := $(call java-lib-files,core-libart)
The Android Open Source Project64100b32009-03-03 19:31:44 -080035
Deepanshu Gupta4df159e2013-11-13 17:22:22 +053036built_ext_dep := $(call java-lib-deps,ext)
37built_ext_classes := $(call java-lib-files,ext)
Colin Cross854dd592017-03-29 16:52:16 -070038
Colin Crosse7472b52018-09-11 22:30:25 -070039built_icudata_dep := $(call java-lib-deps,icu4j-icudata-jarjar,HOST)
40built_icutzdata_dep := $(call java-lib-deps,icu4j-icutzdata-jarjar,HOST)
Deepanshu Gupta4df159e2013-11-13 17:22:22 +053041
Colin Cross854dd592017-03-29 16:52:16 -070042built_layoutlib_create_jar := $(call java-lib-files,layoutlib_create,HOST)
The Android Open Source Project64100b32009-03-03 19:31:44 -080043
44# This is mostly a copy of config/host_java_library.mk
45LOCAL_MODULE := temp_layoutlib
46LOCAL_MODULE_CLASS := JAVA_LIBRARIES
47LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
48LOCAL_IS_HOST_MODULE := true
Colin Cross854dd592017-03-29 16:52:16 -070049LOCAL_BUILT_MODULE_STEM := classes.jar
The Android Open Source Project64100b32009-03-03 19:31:44 -080050
51#######################################
52include $(BUILD_SYSTEM)/base_rules.mk
53#######################################
54
Jerome Gaillardea004612018-10-18 16:09:29 +010055$(LOCAL_BUILT_MODULE): $(built_core_dep) \
The Android Open Source Project64100b32009-03-03 19:31:44 -080056 $(built_framework_dep) \
Deepanshu Gupta4df159e2013-11-13 17:22:22 +053057 $(built_ext_dep) \
Jerome Gaillardea004612018-10-18 16:09:29 +010058 $(built_icudata_dep) \
59 $(built_icutzdata_dep) \
The Android Open Source Project64100b32009-03-03 19:31:44 -080060 $(built_layoutlib_create_jar)
Joe Onorato56d21892010-07-14 19:58:30 -070061 $(hide) echo "host layoutlib_create: $@"
62 $(hide) mkdir -p $(dir $@)
63 $(hide) rm -f $@
64 $(hide) ls -l $(built_framework_classes)
Deepanshu Gupta5ef64dd2014-07-15 13:15:15 -070065 $(hide) java -ea -jar $(built_layoutlib_create_jar) \
diegoperez62626142018-11-23 15:21:50 +000066 --create-stub \
The Android Open Source Project64100b32009-03-03 19:31:44 -080067 $@ \
68 $(built_core_classes) \
Deepanshu Gupta4df159e2013-11-13 17:22:22 +053069 $(built_framework_classes) \
Deepanshu Guptafa4c9e62014-01-16 14:16:23 -080070 $(built_ext_classes) \
Jerome Gaillardea004612018-10-18 16:09:29 +010071 $(built_icudata_dep) \
72 $(built_icutzdata_dep) \
Deepanshu Guptafa4c9e62014-01-16 14:16:23 -080073 $(built_ext_data)
Joe Onorato56d21892010-07-14 19:58:30 -070074 $(hide) ls -l $(built_framework_classes)
The Android Open Source Project64100b32009-03-03 19:31:44 -080075
76
Dan Willemsen8325d602017-10-19 20:37:02 -070077my_link_type := java
78my_warn_types :=
79my_allowed_types :=
80my_link_deps :=
81my_2nd_arch_prefix :=
82my_common := COMMON
83include $(BUILD_SYSTEM)/link_type.mk
84
The Android Open Source Project64100b32009-03-03 19:31:44 -080085#
86# Include the subdir makefiles.
87#
88include $(call all-makefiles-under,$(LOCAL_PATH))
Jaesung Chung3497f7a2017-10-31 14:11:59 +090089
90endif