Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6053ac18 authored by Hadrien Zalek's avatar Hadrien Zalek
Browse files

Fix Java flags in TF template to work with JDK 17+

Isolated TF tests are failing since the `--add-exports` option cannot be
parsed by JDK 17+ due to a missing '<target-module>' component. This
change resolves the issue by adjusting the options in the TF template to
export the source package to all unnamed modules.

See
https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-2F61F3A9-0979-46A4-8B49-325BA0EE8B66
for more information.

Test: atest --host HelloWorldHostTest
Change-Id: Iccb8a8dcd3707237e018d6feb6b6a0e8d2bc9a86
parent 09207360
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,6 +24,6 @@
    <test class="com.android.tradefed.testtype.IsolatedHostTest" >
        <option name="jar" value="{MODULE}.jar" />
        <option name="java-flags" value="--add-modules=jdk.compiler"/>
        <option name="java-flags" value="--add-exports=jdk.compiler/com.sun.tools.javac.api"/>
        <option name="java-flags" value="--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
    </test>
</configuration>