aapt2.mk will export a srcjar that will be compiled by java.mk, so
it needs to be evaluated first. Also move java_renderscript.mk
before aapt2.mk so that the generated resoures are available.
Bug: 73885582
Test: m checkbuild
Test: rm -rf out/target/common/obj/APPS/RsHelloCompute_intermediates &&
m out/target/common/obj/APPS/RsHelloCompute_intermediates/src/R.stamp
Change-Id: Ide3050ec993a945f7077b75e952c3b3532306ede
Merged-In: Ide3050ec993a945f7077b75e952c3b3532306ede
(cherry picked from commit 8528eabbba)
The aapt flags were being set in java_common.mk, which is used by
various entry points. host_dalvik_java_library.mk and
host_java_library.mk, and java_library.mk don't support aapt, only
package_internal.mk and static_java_library.mk do. Move the aapt
flags into aapt_flags.mk, and include it from package_internal.mk
and static_java_library.mk.
Bug: 73885582
Test: no change to build-${TARGET_PRODUCT}.ninja
Change-Id: I124393846d37b9bbc941272cce4274121ac235ef
Merged-In: I124393846d37b9bbc941272cce4274121ac235ef
(cherry picked from commit b6013af085)