Merge "Convert Android.mk to Android.bp" into sc-dev-plus-aosp am: 7a80636fa6 am: 49fb313b62

Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/14637455

Change-Id: I7b34fc06ae4ab62a3f2e2299bb47e407b3013705
This commit is contained in:
Yuntao Xu
2021-06-23 18:49:14 +00:00
committed by Automerger Merge Worker
4 changed files with 45 additions and 58 deletions

View 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"],
}

View File

@@ -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))

View 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",
}

View File

@@ -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)