1# Copyright (C) 2014 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15LOCAL_PATH := $(call my-dir) 16 17# build vogar jar 18# ============================================================ 19 20include $(CLEAR_VARS) 21 22LOCAL_MODULE := vogar.jar 23LOCAL_MODULE_TAGS := optional 24LOCAL_MODULE_CLASS := JAVA_LIBRARIES 25intermediates := $(call local-intermediates-dir,COMMON) 26LOCAL_SRC_FILES := $(call all-java-files-under, src/) 27LOCAL_JAVA_RESOURCE_DIRS := resources 28 29LOCAL_STATIC_JAVA_LIBRARIES := \ 30 vogar-caliper \ 31 vogar-gson-1.7.1 \ 32 vogar-guava \ 33 vogar-jsr305 \ 34 vogar-kxml-libcore-20110123 \ 35 vogar-miniguice \ 36 vogar-mockito-all-1.8.5 \ 37 38# Vogar uses android.jar. 39LOCAL_SDK_VERSION := 9 40 41# This is really a host java library which pretends to be a target 42# java library to pull in the Android SDK. We don't want to use jack 43# because jack doesn't produce jar files for STATIC_JAVA_LIBRARIES, 44# and produces its own intermediate representation instead. 45LOCAL_JACK_ENABLED := disabled 46include $(BUILD_STATIC_JAVA_LIBRARY) 47 48# Build dependencies. 49# ============================================================ 50include $(CLEAR_VARS) 51 52LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \ 53 vogar-caliper:lib/caliper$(COMMON_JAVA_PACKAGE_SUFFIX) \ 54 vogar-gson-1.7.1:lib/gson-1.7.1$(COMMON_JAVA_PACKAGE_SUFFIX) \ 55 vogar-guava:lib/guava$(COMMON_JAVA_PACKAGE_SUFFIX) \ 56 vogar-jsr305:lib/jsr305$(COMMON_JAVA_PACKAGE_SUFFIX) \ 57 vogar-kxml-libcore-20110123:lib/kxml-libcore-20110123$(COMMON_JAVA_PACKAGE_SUFFIX) \ 58 vogar-miniguice:lib/miniguice$(COMMON_JAVA_PACKAGE_SUFFIX) \ 59 vogar-mockito-all-1.8.5:lib/mockito-all-1.8.5$(COMMON_JAVA_PACKAGE_SUFFIX) \ 60 61LOCAL_MODULE_TAGS := optional 62 63include $(BUILD_MULTI_PREBUILT) 64 65# copy vogar script 66# ============================================================ 67include $(CLEAR_VARS) 68LOCAL_IS_HOST_MODULE := true 69LOCAL_MODULE_CLASS := EXECUTABLES 70LOCAL_MODULE_TAGS := optional 71LOCAL_MODULE := vogar 72 73include $(BUILD_SYSTEM)/base_rules.mk 74 75$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/bin/vogar-android vogar.jar | $(ACP) 76 @echo "Copy: $(PRIVATE_MODULE) ($@)" 77 $(copy-file-to-new-target) 78 $(hide) chmod 755 $@ 79