Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d6eaf7e authored by Colin Cross's avatar Colin Cross Committed by android-build-merger
Browse files

Merge "Convert Contacts to Android.bp"

am: e88ebe69

Change-Id: Ib860ad8455358f2c84c8ef425e37766754fe97a2
parents 3c7fff26 e88ebe69
Loading
Loading
Loading
Loading

Android.bp

0 → 100644
+37 −0
Original line number Diff line number Diff line
android_app {
    name: "Contacts",

    srcs: [
        "src/**/*.java",
        "src-bind/**/*.java",
    ],

    static_libs: [
        "com.android.phone.common-lib",

        "com.google.android.material_material",
        "androidx.transition_transition",
        "androidx.legacy_legacy-support-v13",
        "androidx.appcompat_appcompat",
        "androidx.cardview_cardview",
        "androidx.recyclerview_recyclerview",
        "androidx.palette_palette",
        "androidx.legacy_legacy-support-v4",
        "android-common",
        "com.android.vcard",
        "guava",
        "libphonenumber",
    ],

    certificate: "shared",
    product_specific: true,
    privileged: true,
    required: ["privapp_whitelist_com.android.contacts"],

    optimize: {
        proguard_flags_files: ["proguard.flags"],
    },

    sdk_version: "current",
    min_sdk_version: "21",
}

Android.mk

deleted100644 → 0
+0 −52
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

phone_common_dir := ../PhoneCommon

src_dirs := src src-bind $(phone_common_dir)/src
res_dirs := res $(phone_common_dir)/res
asset_dirs := assets

LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs))
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
LOCAL_ASSET_DIR := $(addprefix $(LOCAL_PATH)/, $(asset_dirs))

LOCAL_STATIC_ANDROID_LIBRARIES := \
    com.google.android.material_material \
    androidx.transition_transition \
    androidx.legacy_legacy-support-v13 \
    androidx.appcompat_appcompat \
    androidx.cardview_cardview \
    androidx.recyclerview_recyclerview \
    androidx.palette_palette \
    androidx.legacy_legacy-support-v4

LOCAL_STATIC_JAVA_LIBRARIES := \
    android-common \
    com.android.vcard \
    guava \
    libphonenumber

LOCAL_USE_AAPT2 := true

LOCAL_AAPT_FLAGS := \
    --auto-add-overlay \
    --extra-packages com.android.phone.common

LOCAL_PACKAGE_NAME := Contacts
LOCAL_CERTIFICATE := shared
LOCAL_PRODUCT_MODULE := true
LOCAL_PRIVILEGED_MODULE := true
LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.contacts

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

LOCAL_SDK_VERSION := current
LOCAL_MIN_SDK_VERSION := 21

include $(BUILD_PACKAGE)

# Use the following include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))

tests/Android.bp

0 → 100644
+25 −0
Original line number Diff line number Diff line
android_test {
    name: "ContactsTests",

    certificate: "shared",

    srcs: ["src/**/*.java"],

    instrumentation_for: "Contacts",

    sdk_version: "current",
    min_sdk_version: "21",

    static_libs: [
        "androidx.test.rules",
        "hamcrest-library",
        "mockito-target-minus-junit4",
        "ub-uiautomator",
    ],

    libs: [
        "android.test.runner.stubs",
        "android.test.base.stubs",
        "android.test.mock.stubs",
    ],
}

tests/Android.mk

deleted100644 → 0
+0 −36
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

# We only want this apk build for tests.
LOCAL_MODULE_TAGS := tests
LOCAL_CERTIFICATE := shared

LOCAL_SRC_FILES := $(call all-java-files-under, src)

res_dirs := res
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))

LOCAL_PACKAGE_NAME := ContactsTests

LOCAL_INSTRUMENTATION_FOR := Contacts

LOCAL_SDK_VERSION := current
LOCAL_MIN_SDK_VERSION := 21

LOCAL_STATIC_JAVA_LIBRARIES += \
    androidx.test.rules \
    hamcrest-library \
    mockito-target-minus-junit4 \
    ub-uiautomator

LOCAL_JAVA_LIBRARIES := \
    android.test.runner.stubs \
    android.test.base.stubs \
    android.test.mock.stubs \


LOCAL_AAPT_FLAGS := \
    --auto-add-overlay \
    --extra-packages com.android.contacts.common.tests

include $(BUILD_PACKAGE)