Skip to content

Commit e2e9113

Browse files
authored
docs(sample): remove unused dependency and add setup instructions (#2010)
1 parent aa2830d commit e2e9113

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

samples/native-image-sample/README.md

+36-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,42 @@ The BigQuery sample application demonstrates some common operations with [Google
44

55
## Setup Instructions
66

7-
1. Follow the [GCP Project Authentication and Native Image Setup Instructions](../../README.md).
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 native image compiler.
24+
25+
You can follow [the 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+
```
843
944
2. [Enable the BigQuery APIs](https://console.cloud.google.com/apis/api/bigquery.googleapis.com).
1045

samples/native-image-sample/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@
9090
<id>native</id>
9191

9292
<dependencies>
93-
<dependency>
94-
<groupId>com.google.cloud</groupId>
95-
<artifactId>native-image-support</artifactId>
96-
<version>0.13.1</version>
97-
</dependency>
9893
<dependency>
9994
<groupId>org.junit.vintage</groupId>
10095
<artifactId>junit-vintage-engine</artifactId>

0 commit comments

Comments
 (0)