expo / turtle

Standalone app builder service
MIT License
384 stars 29 forks source link

Update JDK 8 dependencies #380

Closed winie closed 2 years ago

winie commented 2 years ago

Feature Request

Motivation Behind Feature

Android toolchain no longer requires JDK 8. JDK 17 is now also supported. A similar ticket was closed because Android only supported JDK 8: #190

Feature Description

JDK 8 must always be installed and set via an environment variable so that tutle-cli can build an android app. Also, JDK 8 (OpenJDK) is no longer properly maintained.

CI/CD cannot use standard JDK but must set JAVA_HOME. (Already caused errors)

Alternatives or Workarounds

Build scripts for inexperienced workers. Sometimes employees want to build android apps locally on the computer and not use Expo Go or the Android bundles from CI/CD.

Docker with preconfigured build environment.

n0mer commented 2 years ago

@winie rnfirebase leads to EAS build failures:

java.lang.UnsupportedClassVersionError: com/google/firebase/perf/plugin/FirebasePerfPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

n0mer commented 2 years ago

https://mvnrepository.com/artifact/com.google.firebase/perf-plugin - since 1.4.1 classes are compiled by jdk 11

c:\temp\perf-plugin-1.4.1.jar\com\google\firebase\perf\plugin>javap -verbose FirebasePerfPlugin | findstr "major"
Warning: Binary file FirebasePerfPlugin contains com.google.firebase.perf.plugin.FirebasePerfPlugin
  major version: 55
c:\temp\perf-plugin-1.4.0.jar\com\google\firebase\perf\plugin>javap -verbose FirebasePerfPlugin | findstr "major"
Warning: Binary file FirebasePerfPlugin contains com.google.firebase.perf.plugin.FirebasePerfPlugin
  major version: 52
n0mer commented 2 years ago

One more thing:

warning: Current JDK version 1.8.0_312-8u312-b07-0ubuntu1~18.04-b07 has a bug (https://bugs.openjdk.java.net/browse/JDK-8007720) that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+.

winie commented 2 years ago

One more thing:

warning: Current JDK version 1.8.0_312-8u312-b07-0ubuntu1~18.04-b07 has a bug (https://bugs.openjdk.java.net/browse/JDK-8007720) that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+.

I don't know if this bug comes into play with an Expo app. But now that I know that there is such a bug in OpenJDK 8, I would like to classify the issue as a bug after the fact.

wkozyra95 commented 2 years ago

the latest version of turtle-cli does not validate what version of java is installed