Merge "Convert Android.mk to Android.bp" into sc-dev-plus-aosp am: 7a80636fa6
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/14637455 Change-Id: If1944a7cc69f716e7ad5bacf0a25717d16773872
This commit is contained in:
24
samples/ApiDemos/Android.bp
Normal file
24
samples/ApiDemos/Android.bp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package {
|
||||||
|
// See: http://go/android-license-faq
|
||||||
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||||
|
}
|
||||||
|
|
||||||
|
android_test {
|
||||||
|
name: "ApiDemos",
|
||||||
|
// Only compile source java files in this apk.
|
||||||
|
srcs: [
|
||||||
|
"src/**/*.java",
|
||||||
|
"src/com/example/android/apis/app/IRemoteService.aidl",
|
||||||
|
"src/com/example/android/apis/app/IRemoteServiceCallback.aidl",
|
||||||
|
"src/com/example/android/apis/app/ISecondary.aidl",
|
||||||
|
],
|
||||||
|
static_libs: [
|
||||||
|
"androidx-constraintlayout_constraintlayout",
|
||||||
|
"androidx.legacy_legacy-support-v4",
|
||||||
|
],
|
||||||
|
sdk_version: "current",
|
||||||
|
dex_preopt: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
test_suites: ["device-tests"],
|
||||||
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
LOCAL_PATH:= $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_MODULE_TAGS := samples tests
|
|
||||||
|
|
||||||
# Only compile source java files in this apk.
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
$(call all-java-files-under, src) \
|
|
||||||
src/com/example/android/apis/app/IRemoteService.aidl \
|
|
||||||
src/com/example/android/apis/app/IRemoteServiceCallback.aidl \
|
|
||||||
src/com/example/android/apis/app/ISecondary.aidl \
|
|
||||||
|
|
||||||
LOCAL_STATIC_ANDROID_LIBRARIES += \
|
|
||||||
androidx-constraintlayout_constraintlayout \
|
|
||||||
androidx.legacy_legacy-support-v4
|
|
||||||
|
|
||||||
LOCAL_USE_AAPT2 := true
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := ApiDemos
|
|
||||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
||||||
LOCAL_LICENSE_CONDITIONS := notice
|
|
||||||
|
|
||||||
LOCAL_SDK_VERSION := current
|
|
||||||
|
|
||||||
LOCAL_DEX_PREOPT := false
|
|
||||||
|
|
||||||
LOCAL_COMPATIBILITY_SUITE := device-tests
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
||||||
|
|
||||||
# Use the folloing include to make our test apk.
|
|
||||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
|
||||||
21
samples/ApiDemos/tests/Android.bp
Normal file
21
samples/ApiDemos/tests/Android.bp
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
package {
|
||||||
|
// See: http://go/android-license-faq
|
||||||
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||||
|
}
|
||||||
|
|
||||||
|
android_test {
|
||||||
|
name: "ApiDemosTests",
|
||||||
|
// We only want this apk build for tests.
|
||||||
|
libs: [
|
||||||
|
"android.test.runner.stubs",
|
||||||
|
"android.test.base.stubs",
|
||||||
|
],
|
||||||
|
static_libs: ["junit"],
|
||||||
|
// Include all test java files.
|
||||||
|
srcs: ["src/**/*.java"],
|
||||||
|
// Notice that we don't have to include the src files of ApiDemos because, by
|
||||||
|
// running the tests using an instrumentation targeting ApiDemos, we
|
||||||
|
// automatically get all of its classes loaded into our environment.
|
||||||
|
instrumentation_for: "ApiDemos",
|
||||||
|
sdk_version: "current",
|
||||||
|
}
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
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 android.test.base.stubs
|
|
||||||
|
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := junit
|
|
||||||
|
|
||||||
# Include all test java files.
|
|
||||||
LOCAL_SRC_FILES := $(call all-java-files-under, src)
|
|
||||||
|
|
||||||
# Notice that we don't have to include the src files of ApiDemos because, by
|
|
||||||
# running the tests using an instrumentation targeting ApiDemos, we
|
|
||||||
# automatically get all of its classes loaded into our environment.
|
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := ApiDemosTests
|
|
||||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
||||||
LOCAL_LICENSE_CONDITIONS := notice
|
|
||||||
|
|
||||||
LOCAL_INSTRUMENTATION_FOR := ApiDemos
|
|
||||||
|
|
||||||
LOCAL_SDK_VERSION := current
|
|
||||||
|
|
||||||
include $(BUILD_PACKAGE)
|
|
||||||
Reference in New Issue
Block a user