Commit Graph

6 Commits

Author SHA1 Message Date
Nan Zhang
b78c3a22f7 Wrap private-stub-annotations in android.jar
Test: javap -classpath classes.jar androidx.annotation.RecentlyNullable
Compiled from "RecentlyNullable.java"
interface androidx.annotation.RecentlyNullable extends java.lang.annotation.Annotation {
}
Bug: b/78245848

Change-Id: Ie28dea72e8795277e78a8fb0ff2173ab60c31078
2018-07-13 16:39:19 -07:00
David Brazdil
51c1288030 Compile API stubs to dex
Add 'compile_dex' flag to API stub rules. Soong will generate build
targets which compile the JARs into dex files. Those will be compared
against the boot class path dex files to determine the public API surface.

Bug: 79409988
Test: m android_stubs_current, check javalib.jar contains classes.dex
Change-Id: Ie7238572ece0678133ba08203108a923ea2f56ba
2018-07-10 10:31:11 +00:00
Nan Zhang
b28bc7e67c Add Metalava based android.jar targets in Androi.bp
Test: m -j metalava_android_stubs_current
Bug: b/78245848
Change-Id: I5720659a72a91a08aebc4631e23001384fdf8264
2018-06-13 17:47:05 -07:00
Colin Cross
9b0d510e08 Add java_system_modules for current sdk stubs
Building with -target 1.9 requires system modules to use in place
of the bootclasspath, add java_system_modules to generate them.

Test: m EXPERIMENTAL_USE_OPENJDK9=true
Change-Id: I3f54b987efa528078b1e34b743137540c69edf74
2018-04-13 17:38:47 -07:00
Nan Zhang
7bec487c2a Set java_version:1.8 for Android stubs jar generation
Currently Soong based Android stubs jar generation is broken
when EXPERIMENTAL_USE_OPENJDK9=true with following errors:
"Unable to find package java.lang in classpath or bootclasspath"

In old development/build/build_android_stubs.mk
all these jar targets were forced to be built with -source 1.8 -target
1.8
https://android-review.googlesource.com/c/platform/development/+/630280

Test: m android_stubs_current EXPERIMENTAL_USE_OPENJDK9=true
Bug: b/70351683

Change-Id: Ice0224a97e458f92e5b4c5994fa67079d2788d57
2018-03-21 17:47:06 -07:00
Nan Zhang
394d86b3cd Generate Soong based (system/test_)stubs_current jar
And remove build_android_stubs.mk
Bug: b/70351683

Test: m soong_android_stubs_current
cp out/soong/.intermediates/development/build/soong_android_stubs_current/android_common/combined/soong_android_stubs_current.jar new/ &&
cp out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes.jar old/ &&
cd new/; find . -type f -name "*.class" -exec md5sum {} \+ | ( cd old; md5sum -c --quiet )

zipinfo > entries.toc, results are identical.

Change-Id: I24013e20481392e15ef6362c5cc239740531625f
Merged-In: I24013e20481392e15ef6362c5cc239740531625f
2018-03-20 11:29:54 -07:00