1 # 2 # Copyright (C) 2016 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 LOCAL_PATH := $(call my-dir) 17 18 # apksig library, for signing APKs and verifying signatures of APKs 19 # ============================================================ 20 include $(CLEAR_VARS) 21 LOCAL_MODULE := apksig 22 LOCAL_SRC_FILES := $(call all-java-files-under, src/main/java) 23 24 include $(BUILD_HOST_JAVA_LIBRARY) 25 26 27 # apksigner command-line tool for signing APKs and verifying their signatures 28 # ============================================================ 29 include $(CLEAR_VARS) 30 LOCAL_MODULE := apksigner 31 LOCAL_SRC_FILES := $(call all-java-files-under, src/apksigner/java) 32 LOCAL_JAVA_RESOURCE_DIRS = src/apksigner/java 33 LOCAL_JAR_MANIFEST := src/apksigner/apksigner.mf 34 LOCAL_STATIC_JAVA_LIBRARIES := apksig 35 # Output the apksigner.jar library 36 include $(BUILD_HOST_JAVA_LIBRARY) 37 38 # Output the shell script wrapper around the library 39 include $(CLEAR_VARS) 40 LOCAL_IS_HOST_MODULE := true 41 LOCAL_MODULE_CLASS := EXECUTABLES 42 LOCAL_MODULE := apksigner 43 44 include $(BUILD_SYSTEM)/base_rules.mk 45 46 $(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/apksigner$(COMMON_JAVA_PACKAGE_SUFFIX) 47 $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/apksigner | $(ACP) 48 @echo "Copy: $(PRIVATE_MODULE) ($@)" 49 $(copy-file-to-new-target) 50 $(hide) chmod 755 $@ 51