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# 16LOCAL_PATH := $(call my-dir) 17 18# apksig library, for signing APKs and verifying signatures of APKs 19# ============================================================ 20include $(CLEAR_VARS) 21LOCAL_MODULE := apksig 22LOCAL_SRC_FILES := $(call all-java-files-under, src/main/java) 23 24include $(BUILD_HOST_JAVA_LIBRARY) 25 26 27# apksigner command-line tool for signing APKs and verifying their signatures 28# ============================================================ 29include $(CLEAR_VARS) 30LOCAL_MODULE := apksigner 31LOCAL_SRC_FILES := $(call all-java-files-under, src/apksigner/java) 32LOCAL_JAVA_RESOURCE_DIRS = src/apksigner/java 33LOCAL_JAR_MANIFEST := src/apksigner/apksigner.mf 34LOCAL_STATIC_JAVA_LIBRARIES := apksig 35# Output the apksigner.jar library 36include $(BUILD_HOST_JAVA_LIBRARY) 37 38# Output the shell script wrapper around the library 39include $(CLEAR_VARS) 40LOCAL_IS_HOST_MODULE := true 41LOCAL_MODULE_CLASS := EXECUTABLES 42LOCAL_MODULE := apksigner 43 44include $(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