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

Commit 946a0fd9 authored by Colin Cross's avatar Colin Cross
Browse files

Convert Settings to Android.bp

See build/soong/README.md for more information.

Test: m checkbuild
Test: m RunSettingsRoboTests-jacoco
Change-Id: I267534c095c30833f77273dbdb1893b7830ed45d
parent 807e8611
Loading
Loading
Loading
Loading

Android.bp

0 → 100644
+65 −0
Original line number Diff line number Diff line
java_library {
    name: "settings-logtags",
    srcs: ["src/**/*.logtags"],
}

// Build the Settings APK
android_library {
    name: "Settings-core",
    platform_apis: true,
    defaults: [
        "SettingsLibDefaults",
        "SettingsLib-search-defaults",
    ],

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

    static_libs: [
        "androidx-constraintlayout_constraintlayout",
        "androidx.slice_slice-builders",
        "androidx.slice_slice-core",
        "androidx.slice_slice-view",
        "androidx.core_core",
        "androidx.appcompat_appcompat",
        "androidx.cardview_cardview",
        "androidx.preference_preference",
        "androidx.recyclerview_recyclerview",
        "com.google.android.material_material",
        "setupcompat",
        "setupdesign",
        "androidx-constraintlayout_constraintlayout-solver",
        "androidx.lifecycle_lifecycle-runtime",
        "androidx.lifecycle_lifecycle-extensions",
        "guava",
        "jsr305",
        "settings-contextual-card-protos-lite",
        "settings-log-bridge-protos-lite",
        "contextualcards",
        "settings-logtags",
        "zxing-core-1.7",
    ],

    libs: [
        "telephony-common",
        "ims-common",
    ],
}

android_app {
    name: "Settings",
    platform_apis: true,
    certificate: "platform",
    product_specific: true,
    privileged: true,
    required: ["privapp_whitelist_com.android.settings"],
    static_libs: ["Settings-core"],
    resource_dirs: [],
    optimize: {
        proguard_flags_files: ["proguard.flags"],
    },
}

android_library_import {
    name: "contextualcards",
    aars: ["libs/contextualcards.aar"],
}

Android.mk

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

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

LOCAL_MODULE := settings-logtags

include $(BUILD_STATIC_JAVA_LIBRARY)

# Build the Settings APK
include $(CLEAR_VARS)

LOCAL_PACKAGE_NAME := Settings
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRODUCT_MODULE := true
LOCAL_PRIVILEGED_MODULE := true
LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.settings
LOCAL_MODULE_TAGS := optional
LOCAL_USE_AAPT2 := true

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

LOCAL_STATIC_ANDROID_LIBRARIES := \
    androidx-constraintlayout_constraintlayout \
    androidx.slice_slice-builders \
    androidx.slice_slice-core \
    androidx.slice_slice-view \
    androidx.core_core \
    androidx.appcompat_appcompat \
    androidx.cardview_cardview \
    androidx.preference_preference \
    androidx.recyclerview_recyclerview \
    com.google.android.material_material \
    setupcompat \
    setupdesign

LOCAL_JAVA_LIBRARIES := \
    telephony-common \
    ims-common

LOCAL_STATIC_JAVA_LIBRARIES := \
    androidx-constraintlayout_constraintlayout-solver \
    androidx.lifecycle_lifecycle-runtime \
    androidx.lifecycle_lifecycle-extensions \
    guava \
    jsr305 \
    settings-contextual-card-protos-lite \
    settings-log-bridge-protos-lite \
    contextualcards \
    settings-logtags \
    zxing-core-1.7

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

ifneq ($(INCREMENTAL_BUILDS),)
    LOCAL_PROGUARD_ENABLED := disabled
    LOCAL_JACK_ENABLED := incremental
    LOCAL_JACK_FLAGS := --multi-dex native
endif

include frameworks/base/packages/SettingsLib/common.mk
include frameworks/base/packages/SettingsLib/search/common.mk

include $(BUILD_PACKAGE)

# ====  prebuilt library  ========================
include $(CLEAR_VARS)

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
    contextualcards:libs/contextualcards.aar
include $(BUILD_MULTI_PREBUILT)

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

tests/Android.mk

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

# Include all makefiles in subdirectories
include $(call all-makefiles-under,$(LOCAL_PATH))
+24 −0
Original line number Diff line number Diff line
android_test {
    name: "AnomalyTester",

    certificate: "platform",

    libs: ["android.test.runner"],

    static_libs: [
        "androidx.test.rules",
        "mockito-target",
        "ub-uiautomator",
        "truth-prebuilt",
    ],

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

    optimize: {
        enabled: false,
    },

    platform_apis: true,

    instrumentation_for: "Settings",
}

tests/anomaly-tester/Android.mk

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

LOCAL_MODULE_TAGS := tests
LOCAL_CERTIFICATE := platform

LOCAL_JAVA_LIBRARIES := android.test.runner

LOCAL_STATIC_JAVA_LIBRARIES := \
    androidx.test.rules \
    mockito-target \
    ub-uiautomator \
    truth-prebuilt \

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_PROGUARD_ENABLED := disabled

LOCAL_PACKAGE_NAME := AnomalyTester
LOCAL_PRIVATE_PLATFORM_APIS := true

LOCAL_INSTRUMENTATION_FOR := Settings

LOCAL_USE_AAPT2 := true

include $(BUILD_PACKAGE)
Loading