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

Commit e0b2ee52 authored by Colin Cross's avatar Colin Cross
Browse files

Convert services to Android.bp

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

Test: m checkbuild
Exempt-From-Owner-Approval: trivial conversion
Change-Id: I417409281c928ea667d937090d2a0d9d72a449a2
parent 23627fbf
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
// merge all required services into one jar
// ============================================================
java_library {
    name: "services",

    dex_preopt: {
        app_image: true,
        profile: "art-profile",
    },

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

    // The convention is to name each service module 'services.$(module_name)'
    static_libs: [
        "services.core.priorityboosted",
        "services.accessibility",
        "services.appwidget",
        "services.autofill",
        "services.backup",
        "services.companion",
        "services.coverage",
        "services.devicepolicy",
        "services.midi",
        "services.net",
        "services.print",
        "services.restrictions",
        "services.usage",
        "services.usb",
        "services.voiceinteraction",
        "android.hidl.base-V1.0-java",
    ],

    libs: [
        "android.hidl.manager-V1.0-java",
    ],

    // Uncomment to enable output of certain warnings (deprecated, unchecked)
    //javacflags: ["-Xlint"],

}

// native library
// =============================================================

services/Android.mk

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

# merge all required services into one jar
# ============================================================
include $(CLEAR_VARS)

LOCAL_MODULE := services
LOCAL_DEX_PREOPT_APP_IMAGE := true
LOCAL_DEX_PREOPT_GENERATE_PROFILE := true
LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING := $(LOCAL_PATH)/art-profile

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

# EventLogTags files.
LOCAL_SRC_FILES += \
        core/java/com/android/server/EventLogTags.logtags

# Uncomment to enable output of certain warnings (deprecated, unchecked)
# LOCAL_JAVACFLAGS := -Xlint

# Services that will be built as part of services.jar
# These should map to directory names relative to this
# Android.mk.
services := \
    core \
    accessibility \
    appwidget \
    autofill \
    backup \
    companion \
    coverage\
    devicepolicy \
    midi \
    net \
    print \
    restrictions \
    usage \
    usb \
    voiceinteraction

# The convention is to name each service module 'services.$(module_name)'
LOCAL_STATIC_JAVA_LIBRARIES := $(addprefix services.,$(services)) \
    android.hidl.base-V1.0-java \
    android.hardware.biometrics.fingerprint-V2.1-java

LOCAL_JAVA_LIBRARIES := \
    android.hidl.manager-V1.0-java

ifeq ($(EMMA_INSTRUMENT_FRAMEWORK),true)
LOCAL_EMMA_INSTRUMENT := true
endif

include $(BUILD_JAVA_LIBRARY)

# =============================================================

ifeq (,$(ONE_SHOT_MAKEFILE))
# A full make is happening, so make everything.
include $(call all-makefiles-under,$(LOCAL_PATH))
else
# If we ran an mm[m] command, we still want to build the individual
# services that we depend on. This differs from the above condition
# by only including service makefiles and not any tests or other
# modules.
include $(patsubst %,$(LOCAL_PATH)/%/Android.mk,$(services))
endif
+5 −0
Original line number Diff line number Diff line
java_library_static {
    name: "services.accessibility",
    srcs: ["java/**/*.java"],
    libs: ["services.core"],
}

services/accessibility/Android.mk

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

include $(CLEAR_VARS)

LOCAL_MODULE := services.accessibility

LOCAL_SRC_FILES += \
      $(call all-java-files-under,java)

LOCAL_JAVA_LIBRARIES := services.core

include $(BUILD_STATIC_JAVA_LIBRARY)
+5 −0
Original line number Diff line number Diff line
java_library_static {
    name: "services.appwidget",
    srcs: ["java/**/*.java"],
    libs: ["services.core"],
}
Loading