Add a test for jarjar with Java 9 language features.
A genrule generates a clone of Java9LanguageFeaturesTest which uses a
version of Java9LanguageFeatures repackaged by jarjar. This ensures
that jarjar is able to handle a class file which must be at least
v53 and includes bytecode compiled from Java 9 language features.
Test: cts-tradefed run cts-dev -m CtsLibcoreTestCase -t libcore.libcore.internal
Bug: 64761972
Change-Id: I449d903b3cf36a2e8428e8de9097028c57f8c7c5
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index ac394b4..c8dbef5 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -491,6 +491,14 @@
system_modules: "core-all-system-modules",
}
+// A filegroup that provides access to a source file for a toolchain test that
+// checks Java 9 language features are handled properly by JarJar.
+filegroup {
+ name: "core-java-9-language-features-source",
+ srcs: ["luni/src/main/java/libcore/internal/Java9LanguageFeatures.java"],
+ visibility: ["//libcore/luni/src/test/java9language"],
+}
+
// Builds the core-tests library.
java_test {
name: "core-tests",