Merge "Convert services to Android.bp"
This commit is contained in:
@@ -1,3 +1,46 @@
|
||||
// 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
|
||||
// =============================================================
|
||||
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
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
services/accessibility/Android.bp
Normal file
5
services/accessibility/Android.bp
Normal file
@@ -0,0 +1,5 @@
|
||||
java_library_static {
|
||||
name: "services.accessibility",
|
||||
srcs: ["java/**/*.java"],
|
||||
libs: ["services.core"],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
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
services/appwidget/Android.bp
Normal file
5
services/appwidget/Android.bp
Normal file
@@ -0,0 +1,5 @@
|
||||
java_library_static {
|
||||
name: "services.appwidget",
|
||||
srcs: ["java/**/*.java"],
|
||||
libs: ["services.core"],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.appwidget
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := services.core
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
5
services/autofill/Android.bp
Normal file
5
services/autofill/Android.bp
Normal file
@@ -0,0 +1,5 @@
|
||||
java_library_static {
|
||||
name: "services.autofill",
|
||||
srcs: ["java/**/*.java"],
|
||||
libs: ["services.core"],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.autofill
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := services.core
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
5
services/backup/Android.bp
Normal file
5
services/backup/Android.bp
Normal file
@@ -0,0 +1,5 @@
|
||||
java_library_static {
|
||||
name: "services.backup",
|
||||
srcs: ["java/**/*.java"],
|
||||
libs: ["services.core"],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.backup
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := services.core
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
5
services/companion/Android.bp
Normal file
5
services/companion/Android.bp
Normal file
@@ -0,0 +1,5 @@
|
||||
java_library_static {
|
||||
name: "services.companion",
|
||||
srcs: ["java/**/*.java"],
|
||||
libs: ["services.core"],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.companion
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := services.core
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
50
services/core/Android.bp
Normal file
50
services/core/Android.bp
Normal file
@@ -0,0 +1,50 @@
|
||||
java_library_static {
|
||||
name: "services.core",
|
||||
|
||||
aidl: {
|
||||
include_dirs: [
|
||||
"frameworks/native/aidl/binder",
|
||||
"system/netd/server/binder",
|
||||
],
|
||||
},
|
||||
srcs: [
|
||||
"java/**/*.java",
|
||||
":netd_aidl",
|
||||
":netd_metrics_aidl",
|
||||
":installd_aidl",
|
||||
"java/com/android/server/EventLogTags.logtags",
|
||||
"java/com/android/server/am/EventLogTags.logtags",
|
||||
],
|
||||
|
||||
libs: [
|
||||
"services.net",
|
||||
"android.hardware.light-V2.0-java",
|
||||
"android.hardware.power-V1.0-java",
|
||||
"android.hardware.tv.cec-V1.0-java",
|
||||
"android.hidl.manager-V1.0-java",
|
||||
],
|
||||
|
||||
static_libs: [
|
||||
"time_zone_distro",
|
||||
"time_zone_distro_installer",
|
||||
"android.hardware.weaver-V1.0-java",
|
||||
"android.hardware.biometrics.fingerprint-V2.1-java",
|
||||
"android.hardware.oemlock-V1.0-java",
|
||||
"android.hardware.tetheroffload.control-V1.0-java",
|
||||
"android.hardware.vibrator-V1.0-java",
|
||||
"android.hardware.configstore-V1.0-java",
|
||||
],
|
||||
}
|
||||
|
||||
java_genrule {
|
||||
name: "services.core.priorityboosted",
|
||||
srcs: [":services.core"],
|
||||
tools: ["lockedregioncodeinjection"],
|
||||
cmd: "$(location lockedregioncodeinjection) " +
|
||||
" --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/wm/WindowHashMap;\" " +
|
||||
" --pre \"com/android/server/am/ActivityManagerService.boostPriorityForLockedSection,com/android/server/wm/WindowManagerService.boostPriorityForLockedSection\" " +
|
||||
" --post \"com/android/server/am/ActivityManagerService.resetPriorityAfterLockedSection,com/android/server/wm/WindowManagerService.resetPriorityAfterLockedSection\" " +
|
||||
" -o $(out) " +
|
||||
" -i $(in)",
|
||||
out: ["services.core.priorityboosted.jar"],
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.core
|
||||
|
||||
LOCAL_AIDL_INCLUDES := \
|
||||
frameworks/native/aidl/binder \
|
||||
system/netd/server/binder
|
||||
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java) \
|
||||
java/com/android/server/EventLogTags.logtags \
|
||||
java/com/android/server/am/EventLogTags.logtags \
|
||||
../../../../system/netd/server/binder/android/net/INetd.aidl \
|
||||
../../../../system/netd/server/binder/android/net/metrics/INetdEventListener.aidl \
|
||||
../../../native/cmds/installd/binder/android/os/IInstalld.aidl \
|
||||
|
||||
LOCAL_AIDL_INCLUDES += \
|
||||
system/netd/server/binder
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := \
|
||||
services.net \
|
||||
android.hardware.light-V2.0-java \
|
||||
android.hardware.power-V1.0-java \
|
||||
android.hardware.tv.cec-V1.0-java \
|
||||
android.hidl.manager-V1.0-java
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
||||
time_zone_distro \
|
||||
time_zone_distro_installer \
|
||||
android.hidl.base-V1.0-java \
|
||||
android.hardware.weaver-V1.0-java \
|
||||
android.hardware.biometrics.fingerprint-V2.1-java \
|
||||
android.hardware.oemlock-V1.0-java \
|
||||
android.hardware.tetheroffload.control-V1.0-java \
|
||||
android.hardware.vibrator-V1.0-java \
|
||||
android.hardware.configstore-V1.0-java
|
||||
|
||||
ifneq ($(INCREMENTAL_BUILDS),)
|
||||
LOCAL_PROGUARD_ENABLED := disabled
|
||||
LOCAL_JACK_ENABLED := incremental
|
||||
endif
|
||||
|
||||
LOCAL_JACK_FLAGS := \
|
||||
-D jack.transformations.boost-locked-region-priority=true \
|
||||
-D jack.transformations.boost-locked-region-priority.classname=com.android.server.am.ActivityManagerService,com.android.server.wm.WindowHashMap \
|
||||
-D jack.transformations.boost-locked-region-priority.request=com.android.server.am.ActivityManagerService\#boostPriorityForLockedSection,com.android.server.wm.WindowManagerService\#boostPriorityForLockedSection \
|
||||
-D jack.transformations.boost-locked-region-priority.reset=com.android.server.am.ActivityManagerService\#resetPriorityAfterLockedSection,com.android.server.wm.WindowManagerService\#resetPriorityAfterLockedSection
|
||||
|
||||
LOCAL_JAR_PROCESSOR := lockedregioncodeinjection
|
||||
# Use = instead of := to delay evaluation of ${in} and ${out}
|
||||
LOCAL_JAR_PROCESSOR_ARGS = \
|
||||
--targets \
|
||||
"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/wm/WindowHashMap;" \
|
||||
--pre \
|
||||
"com/android/server/am/ActivityManagerService.boostPriorityForLockedSection,com/android/server/wm/WindowManagerService.boostPriorityForLockedSection" \
|
||||
--post \
|
||||
"com/android/server/am/ActivityManagerService.resetPriorityAfterLockedSection,com/android/server/wm/WindowManagerService.resetPriorityAfterLockedSection" \
|
||||
-o ${out} \
|
||||
-i ${in}
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
5
services/coverage/Android.bp
Normal file
5
services/coverage/Android.bp
Normal file
@@ -0,0 +1,5 @@
|
||||
java_library_static {
|
||||
name: "services.coverage",
|
||||
srcs: ["java/**/*.java"],
|
||||
libs: ["jacocoagent"],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.coverage
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := jacocoagent
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
9
services/devicepolicy/Android.bp
Normal file
9
services/devicepolicy/Android.bp
Normal file
@@ -0,0 +1,9 @@
|
||||
java_library_static {
|
||||
name: "services.devicepolicy",
|
||||
srcs: ["java/**/*.java"],
|
||||
|
||||
libs: [
|
||||
"conscrypt",
|
||||
"services.core",
|
||||
],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.devicepolicy
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := conscrypt services.core
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
5
services/midi/Android.bp
Normal file
5
services/midi/Android.bp
Normal file
@@ -0,0 +1,5 @@
|
||||
java_library_static {
|
||||
name: "services.midi",
|
||||
srcs: ["java/**/*.java"],
|
||||
libs: ["services.core"],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.midi
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := services.core
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
4
services/net/Android.bp
Normal file
4
services/net/Android.bp
Normal file
@@ -0,0 +1,4 @@
|
||||
java_library_static {
|
||||
name: "services.net",
|
||||
srcs: ["java/**/*.java"],
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.net
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_AIDL_INCLUDES += \
|
||||
system/netd/server/binder
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
5
services/print/Android.bp
Normal file
5
services/print/Android.bp
Normal file
@@ -0,0 +1,5 @@
|
||||
java_library_static {
|
||||
name: "services.print",
|
||||
srcs: ["java/**/*.java"],
|
||||
libs: ["services.core"],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.print
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := services.core
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
5
services/restrictions/Android.bp
Normal file
5
services/restrictions/Android.bp
Normal file
@@ -0,0 +1,5 @@
|
||||
java_library_static {
|
||||
name: "services.restrictions",
|
||||
srcs: ["java/**/*.java"],
|
||||
libs: ["services.core"],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.restrictions
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := services.core
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
@@ -1,3 +0,0 @@
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
include $(call all-makefiles-under, $(LOCAL_PATH))
|
||||
5
services/usage/Android.bp
Normal file
5
services/usage/Android.bp
Normal file
@@ -0,0 +1,5 @@
|
||||
java_library_static {
|
||||
name: "services.usage",
|
||||
srcs: ["java/**/*.java"],
|
||||
libs: ["services.core"],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.usage
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := services.core
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
14
services/usb/Android.bp
Normal file
14
services/usb/Android.bp
Normal file
@@ -0,0 +1,14 @@
|
||||
java_library_static {
|
||||
name: "services.usb",
|
||||
srcs: ["java/**/*.java"],
|
||||
|
||||
libs: [
|
||||
"services.core",
|
||||
"android.hidl.manager-V1.0-java",
|
||||
],
|
||||
|
||||
static_libs: [
|
||||
"android.hardware.usb-V1.0-java",
|
||||
"android.hardware.usb-V1.1-java",
|
||||
],
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.usb
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := services.core \
|
||||
android.hidl.manager-V1.0-java
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := android.hardware.usb-V1.0-java \
|
||||
android.hardware.usb-V1.1-java
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
5
services/voiceinteraction/Android.bp
Normal file
5
services/voiceinteraction/Android.bp
Normal file
@@ -0,0 +1,5 @@
|
||||
java_library_static {
|
||||
name: "services.voiceinteraction",
|
||||
srcs: ["java/**/*.java"],
|
||||
libs: ["services.core"],
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := services.voiceinteraction
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(call all-java-files-under,java)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := services.core
|
||||
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
@@ -1,4 +1,4 @@
|
||||
java_library_host {
|
||||
java_binary_host {
|
||||
name: "lockedregioncodeinjection",
|
||||
manifest: "manifest.txt",
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
Reference in New Issue
Block a user