google / bundletool

Bundletool is a command-line tool to manipulate Android App Bundles
https://g.co/androidappbundle
Apache License 2.0
3.52k stars 385 forks source link

Java SDK compatibiliy #325

Closed sv99 closed 1 year ago

sv99 commented 1 year ago

Java SDK 1.8

Build error

  1. src/test/java/com/android/tools/build/bundletool/commands/BuildSdkApksForAppCommandTest.java:376: error: cannot find symbol InputStream.readAllBytes()
  2. src/test/java/com/android/tools/build/bundletool/commands/BuildSdkApksForAppCommandTest.java:130: error: cannot find symbol Files.writeString(Path,String)
  3. src/test/java/com/android/tools/build/bundletool/commands/BuildApksCommandTest.java:1477: error: cannot find symbol Files.writeString(Path,String)

OpenJDK 17

Build OK

Test Fail

resourcesLocaleConversions_oldLanguageCodes in the src/test/java/com/android/tools/build/bundletool/model/utils/ResourcesUtilsTest.java

This backward compatibility for old ISO-639 language. Since Java SE 17, this is no longer the case.

OpenJDK 19, 20

Build OK

Test OK after upgrade gradle to 8.1 with PR 328

ymakhno commented 1 year ago

We support bundletool builds on JDK 11. In runtime any JRE 8+ can be used.

We do not have plans to support builds on any other JDKs at the moment. Eventually we will migrate from JDK 11 to JDK 21.