Fix layoutlib compilation with OpenJDK 9 toolchain.
layoutlib needs to support compilation and running (on host) under OpenJDK 8. But before this CL, layoutlib did not specify LOCAL_JAVA_LANGUAGE_VERSION so it was targeting whatever .class file version and source language level was the toolchain's default. Commits f89deaeb and 42e20816 introduced imports from sun.* that are not visible under OpenJDK 9 -target 1.9, breaking such builds. This CL fixes the build by explicitly setting LOCAL_JAVA_LANGUAGE_VERSION := 1.8 which means that layoutlib is compiled with language level 8 and v52 .class files even when the OpenJDK 9 build toolchain is used. Bug: 122643370 Test: EXPERIMENTAL_USE_OPENJDK9=true make layoutlib Change-Id: Ia37c6bf16daf1e46e8eed79a365fda8b705cc55f
Loading
Please sign in to comment