You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This application uses the [Google Cloud Firestore client libraries](https://cloud.google.com/firestore/docs/quickstart-servers#java) and is compatible with Native Image compilation.
4
+
5
+
This sample runs through basic operations of creating a new document, running queries, and then deleting the created resources.
6
+
7
+
## Setup Instructions
8
+
9
+
You will need to follow these prerequisite steps in order to run the samples:
10
+
11
+
1. If you have not already, [create a Google Cloud Platform Project](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project).
12
+
13
+
2. Install the [Google Cloud SDK](https://cloud.google.com/sdk/) which will allow you to run the sample with your project's credentials.
14
+
15
+
Once installed, log in with Application Default Credentials using the following command:
16
+
17
+
```
18
+
gcloud auth application-default login
19
+
```
20
+
21
+
**Note:** Authenticating with Application Default Credentials is convenient to use during development, but we recommend [alternate methods of authentication](https://cloud.google.com/docs/authentication/production) during production use.
22
+
23
+
3. Install the GraalVM compiler.
24
+
25
+
You can follow the [official installation instructions](https://www.graalvm.org/docs/getting-started/#install-graalvm) from the GraalVM website.
26
+
After following the instructions, ensure that you install the native image extension installed by running:
27
+
28
+
```
29
+
gu install native-image
30
+
```
31
+
32
+
Once you finish following the instructions, verify that the default version of Java is set to the GraalVM version by running `java -version` in a terminal.
33
+
34
+
You will see something similar to the below output:
35
+
36
+
```
37
+
$ java -version
38
+
39
+
openjdk version "11.0.7" 2020-04-14
40
+
OpenJDK Runtime Environment GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02)
41
+
OpenJDK 64-Bit Server VM GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02, mixed mode, sharing)
42
+
```
43
+
44
+
## Sample
45
+
46
+
1. If you wish to run the application against the [Firestore emulator](https://cloud.google.com/sdk/gcloud/reference/beta/emulators/firestore), make sure that you have the [Google Cloud SDK](https://cloud.google.com/sdk) installed.
47
+
48
+
In a new terminal window, start the emulator via `gcloud`:
0 commit comments