Switch core-tests-support to @CorePlatformApi
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
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index e187e66..1f312a6 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -334,16 +334,14 @@
hostdex: true,
srcs: ["support/src/test/java/**/*.java"],
- no_standard_libs: true,
+ sdk_version: "core_platform_current",
libs: [
- "core-all",
"junit",
- "bouncycastle",
],
- system_modules: "core-all-system-modules",
static_libs: [
- "bouncycastle-bcpkix",
- "bouncycastle-ocsp",
+ "bouncycastle-unbundled",
+ "bouncycastle-bcpkix-unbundled",
+ "bouncycastle-ocsp-unbundled",
],
}