| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The build system uses core-system-modules with
core.current.stubs, which is incorrect because
core-system-modules contains the implementation
code.
Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true m droid java cts tests docs
Change-Id: Ibda795e829acee2d44ea1fcc2a07951443727cdf
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
layoutlib is one of the existing direct users of core-libart,
but was not listed in visibility because it was in Make. Add
it to visiblility to allow converting it to Soong.
Bug: 122333007
Test: m temp_layoutlib
Change-Id: I73d0c091e26e0d622cbe1459922f35d875bc14b7
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Only the language level 9 version of the targets that (for language
level 8) depend on core-all should be able to depend on
core-all-system-modules; therefore, those two targets should have
the same visibility.
This CL enforces that by defining a constant core_all_visibility that is
used to define the visibility of both build rules.
Test: Treehugger
Change-Id: Idaf0582beea316e328526d4acfbb6f182511f928
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 5a63e0e221801b06db425b3f23942d8a3a3adf61.
Reason for revert: Neil suggested a better approach in a review comment on https://android-review.googlesource.com/c/platform/libcore/+/971162 , so I'm reverting this CL and then implementing the other approach.
Test: Treehugger
Change-Id: I057f9141a034338bde9d2a56cb14b796adbbdf09
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Only the language level 9 version of the targets that
(for language level 8) depend on core-all should be
able to depend on core-all-system-modules; therefore,
those two targets should have the same visibility.
This CL enforces that by moving the visibility rule
to a separate core-all-defaults, which both rules
then use.
Test: Treehugger
Change-Id: Ie34ff300fcfdf49e37604612e5744cf41fd1a740
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Compilation for language level 9 requires java.lang on the module path
(~ the bootclasspath) or sourcepath; being on the classpath is not
enough.
This CL adds core-all-system-modules. Also, for consistency with several
other targets (e.g. external/conscrypt's conscrypt-benchmarks) as well
as with core-all-system-modules, the benchmarks target is changed to
depend on core-all rather than core-oj & core-libart.
Note that dependencies on core-all / core-all-system-modules should be
kept to a minimum. A future CL might introduce an alternative target
to depend on.
Fixes: 133764918
Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true make benchmarks
Change-Id: I5337118c183d6c7a1eab135c122528d4cb0974ef
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This could not be converted because it built the target into a specific
location (/data/caliperperf) that a test depended on and which soong
does not support. However, that test appears to be unowned and broken
and converting will not make the issue worse.
Also, removed the Android.mk file as that was only there to include the
benchmarks/Android.mk file.
Bug: 130204596
Bug: 122333008
Test: vogar --benchmark --classpath out/target/common/obj/JAVA_LIBRARIES/benchmarks_intermediates/classes.jar benchmarks.AdditionBenchmark
Change-Id: I8f4c6963c2f0cab6eb044083f75c887bfc796dfc
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| | |
Bug: 132757397
Test: m checkbuild
Change-Id: I1789fdc2672fa469afe0c6bc539328706745852a
|
| |/
|
|
|
| |
Test: TH
Change-Id: I9ad75c66649b60d363901220929de0ac5c50d96f
|
| |
|
|
|
|
| |
Bug: 132757397
Test: TH
Change-Id: I1201b3e6116ba5f1578e800fd65ecdd2f13a6645
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A recent change to the dexer (see b/130028992) caused it to discard
class retention annotations from the generated dex code. That broke the
testRetentionPolicy_targetSdkVersion_23 test in the
libcore.j.l.reflect.annotations.AnnotationsTest class which was testing
to ensure that class retention annotations were visible to APKs that
target <= 23.
This change extracts the annotations and annotated classes used by the
affected test into their own JAR that is built using the --intermediate
option which prevents the class retention annotations from being
discarded. That JAR is then included in core-tests as a resource. The
retention policy tests extract the resource into its own file, creates
a PathClassLoader for it and then loads the test classes and
annotations from there.
Rather than extract the resource and create the PathClassLoader for
each test this uses JUnit 4 mechanisms to extract the resource once for
the whole class. The retention policy test methods were extracted into
their own class to minimize the change from switching to JUnit 4 and to
minimize the lifespan of the PathClassLoader.
Bug: 132100102
Test: atest \
CtsLibcoreTestCases:libcore.java.lang.reflect.annotations.RetentionPolicyTest \
CtsLibcoreTestCases:libcore.java.lang.reflect.annotations.AnnotationsTest
Change-Id: I67d46b9094d2da94c9cb02da9f0b2c619d0b5cdb
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some code generation tools, notably dagger, produce output which
includes a @Generated annotation when built with javac -source 9
-target 9. This annotation is not part of any Android API, so
compilation fails.
As a workaround for this dagger behaviour, this change introduces a
stub for that annotations, available at compile time only, to keep
javac happy. (This topic should be reverted if dagger is fixed not to
use the annotation in its output.)
The upstream source for Generated.java is OpenJDK 9+181.
N.B. The problem this is fixing does not manifest in AOSP, only in
downstream branches.
Bug: 123891440
Test: EXPERIMENTAL_USE_OPENJDK9=true make droid
(cherry picked from commit 81dd1d9418f62f6888063aeec53e15d123948f0c)
Merged-In: I06ff179384160a598b70959a0b0cd82d439490ce
Change-Id: I55971ce65c74bac75b32f1258a96de7368ac97c0
|
| |
|
|
|
|
|
|
|
| |
Adds visibility to core library modules to prevent them from being
accessed unnecessarily.
Bug: 112158820
Test: make core-tests
Change-Id: Iddcd62224a8a74f68c21ce1431cefe617ee5f071
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove core-libart dependency on /system tz files since there is a copy
guaranteed to be present in the runtime module.
It never required access to tz_version (but it was convenient
at the time it was added to have the device dependencies in one place).
This change removes the dependencies from core-libart. bionic
still has a dependency on the /system copy of the tzdata file so this
does not remove the file from /system.
Bug: 131239046
Test: make installclean / make droid / inspect system dir
Test: atest CtsLibcoreTestCases
Change-Id: Ib209e4787f40c505ba3e9e9ef4adaf6c0e3899c9
|
| |
|
|
|
|
|
|
| |
Move host dependencies for core-libart.
Bug: 131233847
Test: art/test/testrunner/testrunner.py -b --host -t 092
Change-Id: I7655ce9623a012ed6e69b230d029f896e29c591b
|
| |
|
|
|
|
|
|
|
| |
This is in preparation for replacing all instances of
android.annotation.UnsupportedAppUsage with
dalvik.annotation.compat.UnsupportedAppUsage.
Test: m
Change-Id: Iea5977de3cc213d0a0359055297d2c01d00ad5de
|
| |
|
|
|
| |
Test: TH
Change-Id: Id1c95ac9f405532a3e9686bc6bc0b46f0005ef4f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactors code to replace lots of custom code for testing behavior for
specific target SDK versions, whether it is try...finally... blocks or
methods using lambdas with a JUnit 4 TestRule.
As the tests were JUnit 3 that also required switching them from
extending TestCase to extending TestCaseWithRules which adds support
for JUnit 4 TestRules to TestCase.
This is preparation work for some follow up work on ObjectStreamClass.
Test: atest \
core-tests:org.apache.harmony.tests.java.io.ObjectStreamClassTest \
core-tests:libcore.java.lang.OldRuntimeTest \
core-tests:libcore.java.lang.PackageTest \
core-tests:libcore.java.lang.reflect.annotations.AnnotationsTest \
core-tests:libcore.java.util.CollectionsTest \
core-tests:org.apache.harmony.regex.tests.java.util.regex.PatternTest \
core-tests:libcore.junit.util.SwitchTargetSdkVersionRuleTest
Bug: 109930347
Change-Id: I4ea11288eb344eaeb2e6cc9f3225748e518e1827
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Delete unused Docs.mk.
This removes the last reference to non_openjdk_java_files.bp and
openjdk_java_files.bp filegroups from .mk files.
This means that export_to_make_var can be removed in those files.
2) Introduce a filegroup, core_public_api_files, that can be used
from frameworks/base/ rather than "internal" variables defined in
non_openjdk_java_files.bp, openjdk_java_files.bp and conscrypt.
Bug: 126332291
Test: build only
Merged-In: I3c85d17dd7405e65a6be9e60831b1a07e4f08abf
Change-Id: I3c85d17dd7405e65a6be9e60831b1a07e4f08abf
|
| |
|
|
|
|
|
|
|
| |
Also, adds a comment to make it clear that core-current-stubs-gen is
only for use by core.current.stubs.
Bug: 112588401
Test: TH
Change-Id: I1099d40c43047a34ab56b21bf9e7210edae5962f
|
| |
|
|
|
|
|
|
|
|
|
| |
core-simple has served its purpose so can be removed.
Other demo classes that were demonstrating various APIs
can be removed as we have real examples for them. These are
being deleted at the same time.
Bug: 119301609
Test: build
Change-Id: I3634807690257fb7f419fa36c8c0c22305584762
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is no longer needed after http://r.android.com/861802
(build/soong commit dc2da916fb1966fe0fb7a559542aa076ba29898c).
This reverts commit d8afb67d6eb84091e8565d1313ae33e6a33c8413.
Test: libcore.java.nio.file.FileSystemsTest
Test: libcore.java.lang.reflect.ParameterTest
Bug: 121317615
Change-Id: I572a0f7d298c3c78f7e7cda125cf85f518f1de3f
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
FileSystemsTest and ParameterTest currently fail because their
resources (.jar files) are bundled in a preopted form without
classes.dex; constructing a PathClassLoader for those .jar files
fails.
It's not clear to me whether a default around preopting has
changed or what change caused these tests to start failing around
19-20 December 2018. For now, this CL is fixing the tests by
explicitly disabling preopt for the two targets that the tests
bundle as resources; depending on the root cause, a follow-up CL
may or may not be required.
Bug: 121317615
Test: CtsLibcoreTestCases
Change-Id: I5b019cdd1e93fae2954e7028b0d6e4233b3ca51f
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
This is an attempt to keep the files / directory structure
on host the same as device while files are moved around.
The added test also checks that debug information from
CoreLibraryDebug matches expectations.
Bug: 119293618
Test: make droid / flash / vogar --mode app_process luni/src/test/java/libcore/libcore/icu/TimeZoneIntegrationTest.java
Test: make build-art-host && vogar --mode host luni/src/test/java/libcore/libcore/icu/TimeZoneIntegrationTest.java
Change-Id: I877fbe1015af40174b9de513447cef72f3d67c56
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parseNumericAddress and isNumeric methods in InetAddress are used
by apps even though they are not part of the public API. The methods
do more than one thing (parse numeric numbers, extract IPv6 addresses
from inside URL hosts as described in RFC 2732, and provide access to
loopback addresses) and so are not good candidates for exposing as is
in the public API.
Extracting IPv6 addresses is easy to do using standard Java, and the
loopback addresses are already available through other InetAddress
classes. So, this change extracts functionality for parsing numeric
addresses out into a new InetAddressUtils class (with corresponding
tests) that can be then be used as the basis for a public API.
Tested by running:
atest core-tests:libcore.java.net.InetAddressTest \
core-tests:libcore.libcore.net.InetAddressUtilsTest \
CtsNetTestCases:android.net.cts.InetAddressesTest
Bug: 78686891
Test: as above
Change-Id: Ie9eaf5356e1c573ea59dfbb41f9d23cfef14e82c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a CoreLibraryDebug class to provide debug info about
the managed core library. It can later call into bionic
via JNI as needed to add any debug information we want to
expose from libc, etc.
This change also modifies the Core Platform API so that the
RuntimeService in framework (just) has what it needs.
Bug: 119026403
Bug: 118242715
Test: build / boot / adb shell dumpsys runtimeinfo
Change-Id: I9c889c26404c88f40baccfdcd2bab7f012174562
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, libcore does nullability validation of ojluni classes,
using the existence of nullability stub files to indicate which
classes to validate. This change turns on validation for classes which
are annotated directly in the source rather than using stubs, by
listing them explicitly.
This change also adds one annotation previously missing from
BigInteger (which was found by this validation).
Test: core-current-stubs-nullability-validation-check-nullability-warnings
Bug: 73448108
Bug: 64930165
Change-Id: I21fcf45c4c58ec9b93333efbdd29de3eca2f3e81
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce the TzDataSetVersion class to handle time
zone data and format versioning. It is a near-exact
copy of com.android.timezone.distro.DistroVersion
except that constants have been exposed as methods
to avoid inlining (important since the code using
this new class will not be updated when libcore code
is updated with new version requirements in future
versions of Android).
libcore.util is becoming increasingly filled with
time zone related classes so the new class is being
added in libcore.timezone.
Another easy-to-move class, TimeZoneDataFiles is being
moved there. Other time zone data-related classes
will be moved in follow-up changes.
Bug: 119026403
Test: CTS: run cts-dev -m CtsLibcoreTestCases
Change-Id: I57feae567e28950588062e5c67a954ed4f02462e
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This CL is attempt 2; attempt 1 broke robolectric tests.
This CL demonstrates that Java 9 language features are supported
in libcore, and serves as a regression test. Because the Java 9
language sources added are part of libart sources, targets that
include full libart sources (as opposed to libart stubs or
oj sources) now require java_version: "1.9" in order to build.
Supported Java 9 language features are:
- private interface methods
- try-with-resources on effectively final variables
- diamond operator on anonymous classes
- @SafeVarargs annotation on private method
Not supported:
- JSR 376 modules.
Bug: 112443425
Test: cts-tradefed run cts -m CtsLibcoreTestCases
Test: USE_GOMA=true OUT_DIR=out make core.platform.api.stubs
Test: USE_GOMA=true EXPERIMENTAL_USE_OPENJDK9=true OUT_DIR=out-jdk9 \
make -j25 core.platform.api.stubs
Test: Patched this CL on top of the internal master branch and checked:
1.) make checkbuild docs cts droid
2.) cts-tradefed run cts -m CtsLibcoreTestCases \
-t libcore.libcore.internal.Java9LanguageFeaturesTest
3.) make RunSettingsGoogleRoboTests \
RunCarSetupWizardRoboTests RunCarSetupWizardRoboTests-jacoco \
RunCarSetupWizardLibRoboTests RunCarSetupWizardLibRoboTests-jacoco \
RunCarSettingsRoboTests RunCarSettingsRoboTests-jacoco \
RunCarMessengerRoboTests RunCarMessengerRoboTests-jacoco
Change-Id: I145b4d997a27650aa61a73d6ce5b2eb297274949
Merged-In: I145b4d997a27650aa61a73d6ce5b2eb297274949
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This new target enforces that there are no broken annotations (e.g. on
primitive types) and that the missing annotations match the checked-in
warnings file.
This means that anyone checking in some new API surface in a class
which is otherwise annotated must either annotate it, or update the
checked-in warnings file. The latter option is as simple as making the
update target. (The error message contains these instructions.)
Bug: 73448108
Test: `make core-current-stubs-nullability-validation`
Test: `make core-current-stubs-nullability-validation-check-nullability-warnings`
Test: Change something, then `make core-current-stubs-nullability-validation-update-nullability-warnings`
Change-Id: I7ce044631ea144c83bd7ddefb9580bcb08b32a8b
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds stubs for ojluni classes some of whose hidden members are used by
applications. Each such member is annotated with the UnsupportedAppUsage
annotation.
The stubs are built as part of the core-oj-hiddenapi target from which
the build will extract information about the hidden class members that
are used by applications.
This was tested by making and then manually checking that the generated
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt was the
same (after sorting) before and after this change.
Test: see above
Bug: 117818301
Change-Id: Icfe773e00ba1f96a379b705f26ef631ec34fee5e
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are currently three different versions of some java.lang.invoke.*
classes used during compilation / while building java_system_modules:
1.) Manually curated stubs from:
libcore/ojluni/src/lambda/java/java/lang/invoke/
2.) Automatically generated stubs from core-platform-api-stubs.
3.) The full implementation classes from
libcore/ojluni/src/main/java/java/lang/invoke/
The manually curated stubs in 2.) are not complete, for example
CallSite.java is missing the package private CallSite(MethodType)
constructor and therefore gets a default (public no-arg) constructor
instead.
Mixing any two of these breaks compilation of java_system_modules targets:
* core-platform-api-stubs-system-modules broke because it combined
1.) and 2.).
* core-system-modules broke because it combined 1.) and 3.).
The classes from 1.) were included as part of core-lambda-stubs;
including them is inappropriate because the other classes in the
system_modules are a different kind of stubs (2., used in
core-platform-api-stubs-system-modules) or aren't stubs (3., used in
core-system-modules).
This CL fixes that by letting these system modules depend on a new
target core-lambda-stubs-for-system-modules, which omits the classes 1.).
This means that the system-modules only contain the version of these
classes from 2.) or 3.), as appropriate.
Bug: 118100586
Test: EXPERIMENTAL_USE_OPENJDK9=true make core-platform-api-stubs-system-modules
Test: Cherry-picked into internal branch and ran:
EXPERIMENTAL_USE_OPENJDK9=true make checkbuild docs
This command failed, but only at a late step and the
corresponding failure (ran out of space on a filesystem
in the image) is already happening prior to this CL.
Change-Id: I35e8d0b629dd1033afe50e4e674a09c1a16cd029
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
core_platform_current was only used in
a couple of places so it can be replaced with
an alternative.
Bug: 117936519
Test: build
Change-Id: Ia438e42f9d9d805073fecc4ffaaf982f832f9046
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Add apache-xml to core-system-modules for completeness/
correctness.
Bug: 113148576
Test: build
Change-Id: I5fdb422556fa9c5c7f3185627a08639371e9397d
|
| |/
|
|
|
|
|
|
|
| |
Improve documentation around various build rules,
etc.
Bug: 113148576
Test: build
Change-Id: I04c85be3dc0e3a26464b6d14ecb80cbb70595d9e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than depending on internals, switch core-tests-support
to using the core platform API.
core-tests-support had a static dependency on the platform
bouncycastle target which included a copy of the repackaged
bouncycastle in CTS. This copy would then not be used. This looks
like a mistake. After this change a copy of bouncycastle is included
under its original package.
TestIoUtils was relying on a hidden method in java.lang.Math. This
has been replaced with public API calls.
Bug: 113148576
Test: build
Test: Ran CTS: cts -m CtsLibcoreTestCases
Change-Id: Ib8045537c2c191aca3f416cc459f265c8d957dfc
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The libcore tests need access to implementation details
so must be explicitly set to use impl jars before we switch to
stubs by default.
There are some dependencies coming along that have hostdex variants.
These appear to be needed to avoid breaking checkbuild so are also
being added here.
Bug: 113148576
Test: build
Change-Id: Ide3f26976f55ab833375f67dbb20674877815874
|
| |
|
|
|
|
|
|
|
| |
This change relates to one in build/soong that adds
bouncycastle, conscrypt and okhttp.
Bug: 113148576
Test: treehugger
Change-Id: I3bf02b065c92ccc86df77234625481130894c08d
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An initial set of methods that need to be visible in
the intra-core API surface for conscrypt to compile.
There's a fix in JavaLibrary.bp to the core-current-stubs-gen
target to stop files in openjdk_mmodule_extra_files showing
up in the core.current.stubs.
Bug: 110404540
Bug: 113148576
Test: build
Change-Id: I4bade4dac925cfcb14df9335918319be897ac50d
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
See the associated change in external/apache-xml for
full details.
This change adds apache-xml source to the core_api_files
filegroup to include them in the core API files.
Bug: 113148576
Test: build
Change-Id: I2e2dbe15d675bd21b8e0a3a8c8e8763d254851fc
|