File tree Expand file tree Collapse file tree
gcloud-java-core/src/main/java/com/google/gcloud Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ Most `gcloud-java` libraries require a project ID. There are multiple ways to s
8383
84841 . Project ID supplied when building the service options
85852 . Project ID specified by the environment variable ` GCLOUD_PROJECT `
86- 3 . Project ID specified in the JSON credentials file pointed by the ` GOOGLE_APPLICATION_CREDENTIALS ` environment variable
87- 4 . App Engine project ID
86+ 3 . App Engine project ID
87+ 4 . Project ID specified in the JSON credentials file pointed by the ` GOOGLE_APPLICATION_CREDENTIALS ` environment variable
88885 . Google Cloud SDK project ID
89896 . Compute Engine project ID
9090
Original file line number Diff line number Diff line change @@ -383,10 +383,10 @@ protected String defaultHost() {
383383 protected String defaultProject () {
384384 String projectId = System .getProperty (PROJECT_ENV_NAME , System .getenv (PROJECT_ENV_NAME ));
385385 if (projectId == null ) {
386- projectId = serviceAccountProjectId ();
386+ projectId = appEngineProjectId ();
387387 }
388388 if (projectId == null ) {
389- projectId = appEngineProjectId ();
389+ projectId = serviceAccountProjectId ();
390390 }
391391 return projectId != null ? projectId : googleCloudProjectId ();
392392 }
You can’t perform that action at this time.
0 commit comments