作为AOSP构建的一部分构建gradle系统应用 [英] Build gradle system app as part of AOSP build
本文介绍了作为AOSP构建的一部分构建gradle系统应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个基于AOSP的自定义rom,并且我正在开发与其他系统应用程序一样在rom构建过程中打包的系统应用程序.
I have a custom rom based on AOSP and I am working on a system app that is packaged during the rom build just like any other system app.
是否可以在AOSP构建过程中将此应用程序切换为gradle风格的应用程序并使用gradle构建该特定应用程序?即-从makefile开始gradle构建吗?
Is it possible to switch this app to a gradle style app and build that specific app with gradle during the AOSP build? i.e. - Start the gradle build from a makefile?
推荐答案
我没有找到完美的解决方案.但是您可以尝试:
I didn't find a perfect solution for this. But you can try:
Android.mk:
Android.mk:
LOCAL_PATH := $(call my-dir)
$(info $(shell ($(LOCAL_PATH)/gradlew build -p $(LOCAL_PATH)/)) )
$(info $(shell ($(LOCAL_PATH)/finalize.sh $(PRODUCT_OUT))))
finallize.sh:
finallize.sh:
BASEDIR=$(dirname $0)
PRODUCT_PATH=$1
echo $PRODUCT_PATH
java -Xmx1024m -jar $BASEDIR/../../../out/host/linux-x86/framework/signapk.jar $BASEDIR/../../../build/target/product/security/platform.x509.pem $BASEDIR/../../../build/target/product/security/platform.pk8 $BASEDIR/main/build/outputs/apk/main-normal-release-unsigned.apk $PRODUCT_PATH/system/app/MYAPP.apk
对我有用
这篇关于作为AOSP构建的一部分构建gradle系统应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文