I am unable to get the current application version in my attempt to migrate App Engine to Java 11. In Java 8 I did:
import com.google.appengine.api.utils.SystemProperty;
String version = SystemProperty.applicationVersion.get().split("\\.")[0];
However, this AppEngine API is deprecated in Java 11 version of AppEngine. Does anyone have an idea how to do this? I am unable to find this anywhere, there seems to be no documentation on this.
Any help is greatly appreciated!
Edit: I already tried to get in from the metadata endpoint (see: https://cloud.google.com/appengine/docs/standard/java/accessing-instance-metadata). This works for the project-id and region, but the documentation does not state anything about the version. Maybe it is not documented, but also accessible this way (it would make sense).