In production App Engine (standard runtime), reflection to get project ID and credentials won't work unless the user depends on appengine-api-1.0-sdk, even though the necessary jars are already provided by the runtime. To get around this, we should declare a "provided"-scoped dependency on that library in gcloud-java-core and use the AppIdentityService directly instead of through reflection to get credentials and the project ID.
In production App Engine (standard runtime), reflection to get project ID and credentials won't work unless the user depends on appengine-api-1.0-sdk, even though the necessary jars are already provided by the runtime. To get around this, we should declare a "provided"-scoped dependency on that library in
gcloud-java-coreand use theAppIdentityServicedirectly instead of through reflection to get credentials and the project ID.