• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
23LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
24LOCAL_LICENSE_CONDITIONS := notice
25LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
26LOCAL_MODULE_TAGS := optional
27LOCAL_MODULE_CLASS := JAVA_LIBRARIES
28LOCAL_SRC_FILES := $(call all-java-files-under, src/)
29LOCAL_JAVA_RESOURCE_DIRS := resources
30
31LOCAL_STATIC_JAVA_LIBRARIES := \
32  caliper \
33  caliper-gson \
34  guavalib \
35  junit \
36  vogar-jsr305 \
37  vogar-kxml-libcore-20110123
38
39LOCAL_ADDITIONAL_DEPENDENCIES := \
40  $(HOST_OUT_EXECUTABLES)/dx \
41  $(HOST_OUT_EXECUTABLES)/d8 \
42  $(HOST_OUT_JAVA_LIBRARIES)/desugar.jar
43
44# Vogar uses android.jar.
45LOCAL_CLASSPATH := $(call resolve-prebuilt-sdk-jar-path,current)
46
47include $(BUILD_HOST_JAVA_LIBRARY)
48
49# build vogar tests jar
50# ============================================================
51# Run the tests using using the following target.
52.PHONY: run-vogar-tests
53run-vogar-tests: vogar-tests
54	ANDROID_BUILD_TOP=$$(pwd) \
55	  java -cp ./out/host/linux-x86/framework/vogar-tests.jar \
56	  org.junit.runner.JUnitCore vogar.AllTests
57
58include $(CLEAR_VARS)
59
60LOCAL_MODULE := vogar-tests
61LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
62LOCAL_LICENSE_CONDITIONS := notice
63LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
64LOCAL_MODULE_TAGS := optional
65LOCAL_MODULE_CLASS := JAVA_LIBRARIES
66LOCAL_SRC_FILES := $(call all-java-files-under, test/)
67
68LOCAL_STATIC_JAVA_LIBRARIES := \
69	junit \
70	mockito \
71	objenesis \
72	vogar
73
74include $(BUILD_HOST_JAVA_LIBRARY)
75
76# copy vogar script
77# ============================================================
78include $(CLEAR_VARS)
79LOCAL_IS_HOST_MODULE := true
80LOCAL_MODULE_CLASS := EXECUTABLES
81LOCAL_MODULE := vogar
82LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
83LOCAL_LICENSE_CONDITIONS := notice
84LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
85LOCAL_SRC_FILES := bin/vogar-android
86include $(BUILD_PREBUILT)
87