The library has been built without SDK, and is used by an app NfcExtrasTests that is built with SDK. Such this SDK -> non-SDK dependency has been causing link-type check warnings, which will turn into errors soon. This change fixes the warning by making a stub library com.android.nfc_extras.stubs from the runtime library and let the app to link against the stub library. Since the stubs library does not use any private APIs, it is built with SDK. Bug: 69899800 Test: m -j NfcExtrasTests is successful and does not show any link-type check warning. Merged-In: I57980ccbc9036d7cc6df114a975a384d10a2962b Change-Id: I57980ccbc9036d7cc6df114a975a384d10a2962b (cherry picked from commit ded4fd729b50d5298e77199194996d22d3b573cf)
36 lines
1.0 KiB
Makefile
36 lines
1.0 KiB
Makefile
# Copyright 2011, The Android Open Source Project
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
include $(CLEAR_VARS)
|
|
|
|
# We only want this apk build for tests.
|
|
LOCAL_MODULE_TAGS := tests
|
|
|
|
LOCAL_JAVA_LIBRARIES := \
|
|
android.test.runner.stubs \
|
|
com.android.nfc_extras.stubs \
|
|
android.test.base.stubs
|
|
|
|
LOCAL_STATIC_JAVA_LIBRARIES := junit
|
|
|
|
# Include all test java files.
|
|
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
|
|
|
LOCAL_PACKAGE_NAME := NfcExtrasTests
|
|
|
|
LOCAL_SDK_VERSION := current
|
|
|
|
include $(BUILD_PACKAGE)
|