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

Commit 2c3a8045 authored by Jason Monk's avatar Jason Monk Committed by Colin Cross
Browse files

Convert sysui to bp

Test: tests gonna test, builds gonna build
Change-Id: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
Merged-In: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
(cherry picked from commit a2f2d82f)
(cherry picked from commit 1a8ee9d2)
(cherry picked from commit 83ce30d8)
parent 4a8305dc
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
android_library {

    name: "SettingsLib",

    libs: [
        "androidx.annotation_annotation",
        "androidx.legacy_legacy-support-v4",
        "androidx.recyclerview_recyclerview",
        "androidx.preference_preference",
        "androidx.appcompat_appcompat",
        "androidx.lifecycle_lifecycle-runtime",
    ],

    // ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_SHARED_JAVA_LIBRARIES
    // LOCAL_SHARED_JAVA_LIBRARIES := androidx.lifecycle_lifecycle-common

    resource_dirs: ["res"],

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

    min_sdk_version: "21",

}

// For the test package.

packages/SettingsLib/Android.mk

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

LOCAL_USE_AAPT2 := true

LOCAL_AAPT2_ONLY := true

LOCAL_MODULE := SettingsLib

LOCAL_JAVA_LIBRARIES := \
    androidx.annotation_annotation

LOCAL_SHARED_ANDROID_LIBRARIES := \
    androidx.legacy_legacy-support-v4 \
    androidx.recyclerview_recyclerview \
    androidx.preference_preference \
    androidx.appcompat_appcompat \
    androidx.lifecycle_lifecycle-runtime

LOCAL_SHARED_JAVA_LIBRARIES := \
    androidx.lifecycle_lifecycle-common

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res

LOCAL_JAR_EXCLUDE_FILES := none

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

LOCAL_MIN_SDK_VERSION := 21

include $(BUILD_STATIC_JAVA_LIBRARY)

# For the test package.
include $(call all-makefiles-under, $(LOCAL_PATH))
+101 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2018 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.
//

java_library {
    name: "SystemUI-proto",

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

    proto: {
        type: "nano",
    },
}

java_library {
    name: "SystemUI-tags",
    srcs: ["src/com/android/systemui/EventLogTags.logtags"],
}

android_library {
    name: "SystemUI-core",
    srcs: [
        "src/**/*.java",
        "src/**/I*.aidl",
    ],
    resource_dirs: [
        "res-keyguard",
        "res",
    ],
    static_libs: [
        "SystemUIPluginLib",
        "SystemUISharedLib",
        "SettingsLib",
        "androidx.car_car",
        "androidx.legacy_legacy-support-v4",
        "androidx.recyclerview_recyclerview",
        "androidx.preference_preference",
        "androidx.appcompat_appcompat",
        "androidx.mediarouter_mediarouter",
        "androidx.palette_palette",
        "androidx.legacy_legacy-preference-v14",
        "androidx.leanback_leanback",
        "androidx.slice_slice-core",
        "androidx.slice_slice-view",
        "androidx.slice_slice-builders",
        "androidx.arch.core_core-runtime",
        "androidx.lifecycle_lifecycle-extensions",
        "SystemUI-tags",
        "SystemUI-proto",
    ],
    manifest: "AndroidManifest.xml",

    libs: [
        "telephony-common",
        "android.car",
    ],

    aaptflags: [
        "--extra-packages",
        "com.android.keyguard",
    ],
}

android_app {
    name: "SystemUI",
    static_libs: [
        "SystemUI-core",
    ],

    platform_apis: true,
    certificate: "platform",
    privileged: true,

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

    libs: [
        "telephony-common",
        "android.car",
    ],

    dxflags: ["--multi-dex"],
    aaptflags: [
        "--extra-packages",
        "com.android.keyguard",
    ],

}

packages/SystemUI/Android.mk

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

include $(CLEAR_VARS)

LOCAL_MODULE := SystemUI-proto

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

LOCAL_PROTOC_OPTIMIZE_TYPE := nano

include $(BUILD_STATIC_JAVA_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE := SystemUI-tags

LOCAL_SRC_FILES := src/com/android/systemui/EventLogTags.logtags

include $(BUILD_STATIC_JAVA_LIBRARY)

# ------------------

include $(CLEAR_VARS)

LOCAL_USE_AAPT2 := true

LOCAL_MODULE_TAGS := optional

RELATIVE_FINGERPRINT_PATH := ../../core/java/android/hardware/fingerprint

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

LOCAL_STATIC_ANDROID_LIBRARIES := \
    SystemUIPluginLib \
    SystemUISharedLib \
    androidx.car_car \
    androidx.legacy_legacy-support-v4 \
    androidx.recyclerview_recyclerview \
    androidx.preference_preference \
    androidx.appcompat_appcompat \
    androidx.mediarouter_mediarouter \
    androidx.palette_palette \
    androidx.legacy_legacy-preference-v14 \
    androidx.leanback_leanback \
    androidx.slice_slice-core \
    androidx.slice_slice-view \
    androidx.slice_slice-builders \
    androidx.arch.core_core-runtime \
    androidx.lifecycle_lifecycle-extensions \

LOCAL_STATIC_JAVA_LIBRARIES := \
    SystemUI-tags \
    SystemUI-proto

LOCAL_JAVA_LIBRARIES := telephony-common \
    android.car

LOCAL_PACKAGE_NAME := SystemUI
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true

LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res-keyguard $(LOCAL_PATH)/res

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

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

LOCAL_AAPT_FLAGS := --extra-packages com.android.keyguard

include $(BUILD_PACKAGE)

include $(call all-makefiles-under,$(LOCAL_PATH))
+37 −0
Original line number Diff line number Diff line
// Copyright (C) 2016 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.

java_library {

    name: "SystemUIPluginLib",

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


}

android_app {

    // Dummy to generate .toc files.
    name: "PluginDummyLib",
    platform_apis: true,
    srcs: ["src/**/*.java"],

    libs: ["SystemUIPluginLib"],

    optimize: {
        enabled: false,
    },

}
Loading