• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2006 The Android Open Source Project
2#
3LOCAL_PATH := $(call my-dir)
4
5# We use copy-file-to-new-target so that the installed
6# script files' timestamps are at least as new as the
7# .jar files they wrap.
8
9# This tool is prebuilt if we're doing an app-only build.
10ifeq ($(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)),)
11
12# the mainDexClasses rules
13# ============================================================
14include $(CLEAR_VARS)
15LOCAL_IS_HOST_MODULE := true
16LOCAL_MODULE_CLASS := EXECUTABLES
17LOCAL_MODULE_TAGS := optional
18LOCAL_MODULE := mainDexClasses.rules
19LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
20LOCAL_LICENSE_CONDITIONS := notice
21LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
22
23include $(BUILD_SYSTEM)/base_rules.mk
24
25$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/dx$(COMMON_JAVA_PACKAGE_SUFFIX)
26$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/mainDexClasses.rules | $(ACP)
27	@echo "Copy: $(PRIVATE_MODULE) ($@)"
28	$(copy-file-to-new-target)
29
30INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE)
31
32installed_mainDexClasses.rules := $(LOCAL_INSTALLED_MODULE)
33
34# the mainDexClassesNoAapt rules
35# ============================================================
36include $(CLEAR_VARS)
37LOCAL_IS_HOST_MODULE := true
38LOCAL_MODULE_CLASS := EXECUTABLES
39LOCAL_MODULE_TAGS := optional
40LOCAL_MODULE := mainDexClassesNoAapt.rules
41LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
42LOCAL_LICENSE_CONDITIONS := notice
43LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
44
45include $(BUILD_SYSTEM)/base_rules.mk
46
47$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/dx$(COMMON_JAVA_PACKAGE_SUFFIX)
48$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/mainDexClassesNoAapt.rules | $(ACP)
49	@echo "Copy: $(PRIVATE_MODULE) ($@)"
50	$(copy-file-to-new-target)
51
52INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE)
53
54installed_mainDexClassesNoAapt.rules := $(LOCAL_INSTALLED_MODULE)
55
56# the shrinkedAndroid jar is a library used by the mainDexClasses script
57# ============================================================
58include $(CLEAR_VARS)
59LOCAL_IS_HOST_MODULE := true
60LOCAL_MODULE_CLASS := JAVA_LIBRARIES
61LOCAL_MODULE_TAGS := optional
62LOCAL_MODULE := shrinkedAndroid
63LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
64LOCAL_LICENSE_CONDITIONS := notice
65LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
66LOCAL_BUILT_MODULE_STEM := shrinkedAndroid.jar
67LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
68
69include $(BUILD_SYSTEM)/base_rules.mk
70
71$(LOCAL_BUILT_MODULE): PRIVATE_PROGUARD_FLAGS:= \
72  -include $(addprefix $(LOCAL_PATH)/, shrinkedAndroid.proguard.flags)
73$(LOCAL_BUILT_MODULE): $(call java-lib-files,$(call resolve-prebuilt-sdk-module,20)) \
74                       $(addprefix $(LOCAL_PATH)/, shrinkedAndroid.proguard.flags)| $(PROGUARD)
75	@echo Proguard: $@
76	$(hide) $(PROGUARD) -injars "$<(**/*.class)" -outjars $@ $(PRIVATE_PROGUARD_FLAGS)
77
78INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE)
79
80installed_shrinkedAndroid := $(LOCAL_INSTALLED_MODULE)
81
82# the mainDexClasses script
83# ============================================================
84include $(CLEAR_VARS)
85LOCAL_IS_HOST_MODULE := true
86LOCAL_MODULE_CLASS := EXECUTABLES
87LOCAL_MODULE_TAGS := optional
88LOCAL_MODULE := mainDexClasses
89LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
90LOCAL_LICENSE_CONDITIONS := notice
91LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
92
93include $(BUILD_SYSTEM)/base_rules.mk
94
95$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/dx$(COMMON_JAVA_PACKAGE_SUFFIX)
96$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/mainDexClasses | $(ACP)
97	@echo "Copy: $(PRIVATE_MODULE) ($@)"
98	$(copy-file-to-new-target)
99	$(hide) chmod 755 $@
100
101$(LOCAL_INSTALLED_MODULE): | $(installed_shrinkedAndroid) $(installed_mainDexClasses.rules) \
102                             $(installed_mainDexClassesNoAapt.rules)
103INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE)
104
105endif # No TARGET_BUILD_APPS or TARGET_BUILD_PDK
106
107# the jasmin script
108# ============================================================
109include $(CLEAR_VARS)
110LOCAL_IS_HOST_MODULE := true
111LOCAL_MODULE_CLASS := EXECUTABLES
112LOCAL_MODULE_TAGS := optional
113LOCAL_MODULE := jasmin
114LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
115LOCAL_LICENSE_CONDITIONS := notice
116LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
117
118include $(BUILD_SYSTEM)/base_rules.mk
119
120$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/jasmin.jar
121$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/jasmin | $(ACP)
122	@echo "Copy: $(PRIVATE_MODULE) ($@)"
123	$(copy-file-to-new-target)
124	$(hide) chmod 755 $@
125
126INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE)
127
128# the jasmin lib
129# ============================================================
130include $(CLEAR_VARS)
131LOCAL_IS_HOST_MODULE := true
132LOCAL_MODULE_CLASS := JAVA_LIBRARIES
133LOCAL_MODULE_TAGS := optional
134LOCAL_MODULE := jasmin.jar
135LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
136LOCAL_LICENSE_CONDITIONS := notice
137LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
138
139include $(BUILD_SYSTEM)/base_rules.mk
140
141$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/jasmin.jar | $(ACP)
142	@echo "Copy: $(PRIVATE_MODULE) ($@)"
143	$(copy-file-to-target)
144	$(hide) chmod 644 $@
145
146INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE)
147