Add "testng" in classpath, and "--core-library" in LOCAL_DX_FLAGS for
"CtsLibcoreOjTestCases"
As https://android-review.googlesource.com/c/platform/build/+/484163
shows we move classes.jar generation only after JarJar phase to avoid
running desugar/proguard twice for static java libraries.
When we run desugar for CtsLibcoreOjTestCases module we got error:
Class org.testng.Assert not found. Since CtsLibcoreOjTestCases depends
on static module: core-ojtests-public which has "testng" in its own
classpath. Therefore, we add "testng" in the classpath of
CtsLibcoreOjTestCases so that desugar can find the org.testng.Assert.
Also we add LOCAL_DX_FLAGS := --core-library so that when desugar runs,
it can see java.* classes.
Bug: b/65455145
Test: m clean && m out/target/common/obj/APPS/CtsLibcoreOjTestCases_intermediates/classes-desugar.jar
Change-Id: I7ac5d014a6d6a84429f3e9f804823791f54dfdd0
1 file changed