Skip to content

Commit 29cbf0c

Browse files
committed
---
yaml --- r: 7535 b: refs/heads/tswast-patch-1 c: f9cca55 h: refs/heads/master i: 7533: db2e1d5 7531: 8a12e56 7527: c4f609f 7519: 9fa3d63
1 parent edb7072 commit 29cbf0c

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: fbb8f8298a5153828bdeb6b0c24c81820e233a73
60+
refs/heads/tswast-patch-1: f9cca55771d18439dad30de6639958f0e4581c1f
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Most `google-cloud` libraries require a project ID. There are multiple ways to
9595
```java
9696
Datastore datastore = DatastoreOptions.builder().projectId("PROJECT_ID").build().service();
9797
```
98-
* Specify the environment variable `GCLOUD_PROJECT` to be your desired project ID.
98+
* Specify the environment variable `GOOGLE_CLOUD_PROJECT` to be your desired project ID.
9999
* Set the project ID using the [Google Cloud SDK](https://cloud.google.com/sdk/?hl=en). To use the SDK, [download the SDK](https://cloud.google.com/sdk/?hl=en) if you haven't already, and set the project ID from the command line. For example:
100100

101101
```
@@ -105,7 +105,7 @@ Most `google-cloud` libraries require a project ID. There are multiple ways to
105105
`google-cloud` determines the project ID from the following sources in the listed order, stopping once it finds a value:
106106

107107
1. Project ID supplied when building the service options
108-
2. Project ID specified by the environment variable `GCLOUD_PROJECT`
108+
2. Project ID specified by the environment variable `GOOGLE_CLOUD_PROJECT`
109109
3. App Engine project ID
110110
4. Project ID specified in the JSON credentials file pointed by the `GOOGLE_APPLICATION_CREDENTIALS` environment variable
111111
5. Google Cloud SDK project ID

branches/tswast-patch-1/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ public abstract class ServiceOptions<ServiceT extends Service<OptionsT>, Service
6464
OptionsT extends ServiceOptions<ServiceT, ServiceRpcT, OptionsT>> implements Serializable {
6565

6666
private static final String DEFAULT_HOST = "https://www.googleapis.com";
67-
private static final String PROJECT_ENV_NAME = "GCLOUD_PROJECT";
67+
private static final String LEGACY_PROJECT_ENV_NAME = "GCLOUD_PROJECT";
68+
private static final String PROJECT_ENV_NAME = "GOOGLE_CLOUD_PROJECT";
6869
private static final String MANIFEST_ARTIFACT_ID_KEY = "artifactId";
6970
private static final String MANIFEST_VERSION_KEY = "Implementation-Version";
70-
private static final String ARTIFACT_ID = "gcloud-java-core";
71+
private static final String ARTIFACT_ID = "google-cloud-core";
7172
private static final String LIBRARY_NAME = "gcloud-java";
7273
private static final String LIBRARY_VERSION = getLibraryVersion();
7374
private static final String APPLICATION_NAME =
@@ -261,6 +262,10 @@ protected String defaultHost() {
261262

262263
protected String defaultProject() {
263264
String projectId = System.getProperty(PROJECT_ENV_NAME, System.getenv(PROJECT_ENV_NAME));
265+
if (projectId == null) {
266+
projectId =
267+
System.getProperty(LEGACY_PROJECT_ENV_NAME, System.getenv(LEGACY_PROJECT_ENV_NAME));
268+
}
264269
if (projectId == null) {
265270
projectId = appEngineProjectId();
266271
}

branches/tswast-patch-1/google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/DatastoreExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class DatastoreExample {
5353

5454
private static final String USER_KIND = "_DS_EXAMPLE_USER";
5555
private static final String COMMENT_KIND = "_DS_EXAMPLE_COMMENT";
56-
private static final String NAMESPACE = "gcloud_java_example";
56+
private static final String NAMESPACE = "google_cloud_example";
5757
private static final String DEFAULT_ACTION = "display";
5858
private static final Map<String, DatastoreAction> ACTIONS = new HashMap<>();
5959

0 commit comments

Comments
 (0)