summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2018-10-05 15:11:21 -0700
committerTony Wickham <twickham@google.com>2018-10-10 14:02:56 -0700
commit76cce29d66b2c3bd411d7b0f27e350cdb6fb6575 (patch)
tree683fb9fcf45318d709927ed666c81b3a55d6f021 /Android.mk
parent4548a7d48d431aa960bf81494351662a4146ceac (diff)
downloadandroid_packages_apps_Trebuchet-76cce29d66b2c3bd411d7b0f27e350cdb6fb6575.tar.gz
android_packages_apps_Trebuchet-76cce29d66b2c3bd411d7b0f27e350cdb6fb6575.tar.bz2
android_packages_apps_Trebuchet-76cce29d66b2c3bd411d7b0f27e350cdb6fb6575.zip
Add plugin support
- Add libs/plugin_core.jar - Include plugin_core in Launcher3 build (it is already present other builds as part of the updated shared lib) - Add PluginEnablerImpl that uses SharedPrefs to enable/disable plugin components - Add src_plugins, where plugin interfaces will live. It has a build rule to create a jar that plugin projects will depend on. - Copy PluginPreferencesFragment from sysui but using our implementation for PluginEnabler Bug: 115877296 Change-Id: I3db54677eaceb10f92018c0f9d18920ad9ffac39
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk31
1 files changed, 31 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 727c541c4..b8e6c858f 100644
--- a/Android.mk
+++ b/Android.mk
@@ -28,6 +28,35 @@ LOCAL_UNINSTALLABLE_MODULE := true
LOCAL_SDK_VERSION := current
include $(BUILD_PREBUILT)
+include $(CLEAR_VARS)
+LOCAL_MODULE := libPluginCore
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_SRC_FILES := libs/plugin_core.jar
+LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_SDK_VERSION := current
+include $(BUILD_PREBUILT)
+
+#
+# Build rule for plugin lib (needed to write a plugin).
+#
+include $(CLEAR_VARS)
+LOCAL_USE_AAPT2 := true
+LOCAL_AAPT2_ONLY := true
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_STATIC_JAVA_LIBRARIES := libPluginCore
+
+LOCAL_SRC_FILES := \
+ $(call all-java-files-under, src_plugins)
+
+LOCAL_SDK_VERSION := current
+LOCAL_MIN_SDK_VERSION := 28
+LOCAL_MODULE := LauncherPluginLib
+LOCAL_PRIVILEGED_MODULE := true
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
#
# Build rule for Launcher3 dependencies lib.
#
@@ -40,6 +69,8 @@ LOCAL_STATIC_ANDROID_LIBRARIES := \
androidx.recyclerview_recyclerview \
androidx.dynamicanimation_dynamicanimation
+LOCAL_STATIC_JAVA_LIBRARIES := libPluginCore
+
LOCAL_SRC_FILES := \
$(call all-proto-files-under, protos) \
$(call all-proto-files-under, proto_overrides)