Skip to content

Commit

Permalink
docs(sample): remove unused dependency and add setup instructions (#2010
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mpeddada1 authored Apr 27, 2022
1 parent aa2830d commit e2e9113
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
37 changes: 36 additions & 1 deletion samples/native-image-sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,42 @@ The BigQuery sample application demonstrates some common operations with [Google

## Setup Instructions

1. Follow the [GCP Project Authentication and Native Image Setup Instructions](../../README.md).
## Setup Instructions

You will need to follow these prerequisite steps in order to run the samples:

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).

2. Install the [Google Cloud SDK](https://cloud.google.com/sdk/) which will allow you to run the sample with your project's credentials.

Once installed, log in with Application Default Credentials using the following command:

```
gcloud auth application-default login
```

**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.

3. Install the native image compiler.

You can follow [the installation instructions](https://www.graalvm.org/docs/getting-started/#install-graalvm) from the GraalVM website.
After following the instructions, ensure that you install the native image extension installed by running:

```
gu install native-image
```

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.

You will see something similar to the below output:

```
$ java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02)
OpenJDK 64-Bit Server VM GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02, mixed mode, sharing)
```

2. [Enable the BigQuery APIs](https://console.cloud.google.com/apis/api/bigquery.googleapis.com).

Expand Down
5 changes: 0 additions & 5 deletions samples/native-image-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@
<id>native</id>

<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>native-image-support</artifactId>
<version>0.13.1</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
Expand Down

0 comments on commit e2e9113

Please sign in to comment.