Extract class files from dep_api_srcs instead of java files
Currently, stub java files are extracted from srcjar file provided from dep_api_srcs in java_api_library module generated in java_sdk_library per api scope. However, compiling the java files may lead to difference in the content of the generated class files even if the stub java files are equivalent, as javac may arbitrarily add overridden methods. Thus, create a stub jar file instead of creating a stub srcjar file and compiling it, in order to guarantee stub jar files content equivalence and thus enable hiddenapi during from-text stub build. Note that this change does not fully resolve differences between the full api surface csv and the per sdk_library csv. Instead, it removes the difference caused by methods arbitrarily added by javac. This change also renames dep_api_srcs to full_api_surface_stubs to be more intuitive. Test: rebase on top of aosp/2617274 and `m --build-from-text-stub` Bug: 275570206 Change-Id: I22b6d56624633681f5c3b000370b5782655c7b8d
Loading
Please register or sign in to comment