summaryrefslogtreecommitdiff
path: root/java/bootclasspath_fragment.go
diff options
context:
space:
mode:
author satayev <satayev@google.com> 2021-06-04 18:09:40 +0100
committer satayev <satayev@google.com> 2021-06-04 19:42:54 +0100
commit1b75a3ce623357020ec6f1446edff974a0dc283a (patch)
treea059b1bc75fc2247002ce06f9f3bc72f9e2183c3 /java/bootclasspath_fragment.go
parentc306326feab7c4286b91cf2f166d7c878d7ca705 (diff)
Add exemption for framework-sdkextensions-classpaths boot jar.
As long as we have boot jars defined in make, we should try to keep global.UpdatableBootJars as a source of truth when it comes to classpath configuration. However, for testing purposes there is a need to add java libraries to bootclasspath that aren't present in PRODUCT_UPDATABLE_BOOT_JARS variable. Ideally, we would unconditionally add all contents to the config for test apexes, however, I don't fully understand apex merging to support it. Bug: 180105615 Test: atest sdkextensions_classpaths_e2e_tests Change-Id: I552f93289c27b3713e75dcda1faed909b0bfcef2
Diffstat (limited to 'java/bootclasspath_fragment.go')
-rw-r--r--java/bootclasspath_fragment.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go
index 792193f9f..1c7ad78ec 100644
--- a/java/bootclasspath_fragment.go
+++ b/java/bootclasspath_fragment.go
@@ -516,7 +516,16 @@ func (b *BootclasspathFragmentModule) ClasspathFragmentToConfiguredJarList(ctx a
// Only create configs for updatable boot jars. Non-updatable boot jars must be part of the
// platform_bootclasspath's classpath proto config to guarantee that they come before any
// updatable jars at runtime.
- return global.UpdatableBootJars.Filter(stems)
+ jars := global.UpdatableBootJars.Filter(stems)
+
+ // TODO(satayev): for apex_test we want to include all contents unconditionally to classpaths
+ // config. However, any test specific jars would not be present in UpdatableBootJars. Instead,
+ // we should check if we are creating a config for apex_test via ApexInfo and amend the values.
+ // This is an exception to support end-to-end test for SdkExtensions, until such support exists.
+ if android.InList("test_framework-sdkextensions", stems) {
+ jars = jars.Append("com.android.sdkext", "test_framework-sdkextensions")
+ }
+ return jars
}
func (b *BootclasspathFragmentModule) getImageConfig(ctx android.EarlyModuleContext) *bootImageConfig {