Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.

Commit

Permalink
Rename artifacts to native-image-support (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzou authored Sep 28, 2021
1 parent 77d675d commit a7eb979
Show file tree
Hide file tree
Showing 110 changed files with 94 additions and 94 deletions.
2 changes: 1 addition & 1 deletion .cloudbuild/graal-build-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ gu install native-image
--batch-mode \
--quiet \
--projects \!com.example:cloud-functions-sample \
--file java-native-image-samples
--file native-image-samples
24 changes: 12 additions & 12 deletions .cloudbuild/graal-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,50 +49,50 @@ steps:

# Run the tests
- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './java-native-image-samples/native-image-samples-client-library/bigquery-sample/target/com.example.bigquerysampleapplication' ]
args: [ './native-image-samples/native-image-samples-client-library/bigquery-sample/target/com.example.bigquerysampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [
'./java-native-image-samples/native-image-samples-client-library/cloud-sql-sample/target/com.example.cloudsqlsampleapplication',
'./native-image-samples/native-image-samples-client-library/cloud-sql-sample/target/com.example.cloudsqlsampleapplication',
'-Dinstance=cloud-graalvm-support-ci:us-east1:test-instance',
'-Dpassword=root'
]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './java-native-image-samples/native-image-samples-client-library/pubsub-sample/target/com.example.pubsubsampleapplication' ]
args: [ './native-image-samples/native-image-samples-client-library/pubsub-sample/target/com.example.pubsubsampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './java-native-image-samples/native-image-samples-client-library/storage-sample/target/com.example.storagesampleapplication' ]
args: [ './native-image-samples/native-image-samples-client-library/storage-sample/target/com.example.storagesampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './java-native-image-samples/native-image-samples-client-library/logging-sample/target/com.example.loggingsampleapplication' ]
args: [ './native-image-samples/native-image-samples-client-library/logging-sample/target/com.example.loggingsampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './java-native-image-samples/native-image-samples-client-library/secretmanager-sample/target/com.example.secretmanagersampleapplication' ]
args: [ './native-image-samples/native-image-samples-client-library/secretmanager-sample/target/com.example.secretmanagersampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './java-native-image-samples/native-image-samples-client-library/tasks-sample/target/com.example.taskssampleapplication' ]
args: [ './native-image-samples/native-image-samples-client-library/tasks-sample/target/com.example.taskssampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './java-native-image-samples/native-image-samples-client-library/trace-sample/target/com.example.tracesampleapplication' ]
args: [ './native-image-samples/native-image-samples-client-library/trace-sample/target/com.example.tracesampleapplication' ]

- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './java-native-image-samples/native-image-samples-client-library/firestore-sample/target/com.example.firestoresampleapplication' ]
args: [ './native-image-samples/native-image-samples-client-library/firestore-sample/target/com.example.firestoresampleapplication' ]
env:
- 'FIRESTORE_EMULATOR_HOST=firestore-emulator:9010'

- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './java-native-image-samples/native-image-samples-client-library/spanner-sample/target/com.example.spannersampleapplication' ]
args: [ './native-image-samples/native-image-samples-client-library/spanner-sample/target/com.example.spannersampleapplication' ]
env:
- 'SPANNER_EMULATOR_HOST=spanner-emulator:9010'

- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './java-native-image-samples/native-image-samples-client-library/bigtable-sample/target/com.example.bigtablesampleapplication' ]
args: [ './native-image-samples/native-image-samples-client-library/bigtable-sample/target/com.example.bigtablesampleapplication' ]
env:
- 'BIGTABLE_EMULATOR_HOST=bigtable-emulator:9010'

- name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './java-native-image-samples/native-image-samples-client-library/datastore-sample/target/com.example.datastoresampleapplication' ]
args: [ './native-image-samples/native-image-samples-client-library/datastore-sample/target/com.example.datastoresampleapplication' ]
env:
- 'DATASTORE_EMULATOR_HOST=http://datastore-emulator:9010'

Expand Down
24 changes: 12 additions & 12 deletions .cloudbuild/std-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,62 +50,62 @@ steps:
# Run all the samples
- name: openjdk:11-jdk
entrypoint: java
args: ['-jar', 'java-native-image-samples/native-image-samples-client-library/pubsub-sample/target/pubsub-sample-0.8.0-SNAPSHOT.jar']
args: ['-jar', 'native-image-samples/native-image-samples-client-library/pubsub-sample/target/pubsub-sample-0.8.0-SNAPSHOT.jar']

- name: openjdk:11-jdk
entrypoint: java
args: ['-jar', 'java-native-image-samples/native-image-samples-client-library/storage-sample/target/storage-sample-0.8.0-SNAPSHOT.jar']
args: ['-jar', 'native-image-samples/native-image-samples-client-library/storage-sample/target/storage-sample-0.8.0-SNAPSHOT.jar']

- name: openjdk:11-jdk
entrypoint: java
args: ['-jar', 'java-native-image-samples/native-image-samples-client-library/bigquery-sample/target/bigquery-sample-0.8.0-SNAPSHOT.jar']
args: ['-jar', 'native-image-samples/native-image-samples-client-library/bigquery-sample/target/bigquery-sample-0.8.0-SNAPSHOT.jar']

- name: openjdk:11-jdk
entrypoint: java
args: ['-jar', 'java-native-image-samples/native-image-samples-client-library/logging-sample/target/logging-sample-0.8.0-SNAPSHOT.jar']
args: ['-jar', 'native-image-samples/native-image-samples-client-library/logging-sample/target/logging-sample-0.8.0-SNAPSHOT.jar']

- name: openjdk:11-jdk
entrypoint: java
args: ['-jar', 'java-native-image-samples/native-image-samples-client-library/trace-sample/target/trace-sample-0.8.0-SNAPSHOT.jar']
args: ['-jar', 'native-image-samples/native-image-samples-client-library/trace-sample/target/trace-sample-0.8.0-SNAPSHOT.jar']

- name: openjdk:11-jdk
entrypoint: java
args: ['-jar', 'java-native-image-samples/native-image-samples-client-library/secretmanager-sample/target/secretmanager-sample-0.8.0-SNAPSHOT.jar']
args: ['-jar', 'native-image-samples/native-image-samples-client-library/secretmanager-sample/target/secretmanager-sample-0.8.0-SNAPSHOT.jar']

- name: openjdk:11-jdk
entrypoint: java
args: ['-jar', 'java-native-image-samples/native-image-samples-client-library/tasks-sample/target/tasks-sample-0.8.0-SNAPSHOT.jar']
args: ['-jar', 'native-image-samples/native-image-samples-client-library/tasks-sample/target/tasks-sample-0.8.0-SNAPSHOT.jar']

- name: openjdk:11-jdk
entrypoint: java
args: [
'-jar',
'-Dinstance=cloud-graalvm-support-ci:us-east1:test-instance',
'-Dpassword=root',
'java-native-image-samples/native-image-samples-client-library/cloud-sql-sample/target/cloud-sql-sample-0.8.0-SNAPSHOT.jar'
'native-image-samples/native-image-samples-client-library/cloud-sql-sample/target/cloud-sql-sample-0.8.0-SNAPSHOT.jar'
]

- name: openjdk:11-jdk
entrypoint: java
args: ['-jar', 'java-native-image-samples/native-image-samples-client-library/firestore-sample/target/firestore-sample-0.8.0-SNAPSHOT.jar']
args: ['-jar', 'native-image-samples/native-image-samples-client-library/firestore-sample/target/firestore-sample-0.8.0-SNAPSHOT.jar']
env:
- 'FIRESTORE_EMULATOR_HOST=firestore-emulator:9010'

- name: openjdk:11-jdk
entrypoint: java
args: ['-jar', 'java-native-image-samples/native-image-samples-client-library/spanner-sample/target/spanner-sample-0.8.0-SNAPSHOT.jar']
args: ['-jar', 'native-image-samples/native-image-samples-client-library/spanner-sample/target/spanner-sample-0.8.0-SNAPSHOT.jar']
env:
- 'SPANNER_EMULATOR_HOST=spanner-emulator:9010'

- name: openjdk:11-jdk
entrypoint: java
args: ['-jar', 'java-native-image-samples/native-image-samples-client-library/bigtable-sample/target/bigtable-sample-0.8.0-SNAPSHOT.jar']
args: ['-jar', 'native-image-samples/native-image-samples-client-library/bigtable-sample/target/bigtable-sample-0.8.0-SNAPSHOT.jar']
env:
- 'BIGTABLE_EMULATOR_HOST=bigtable-emulator:9010'

- name: openjdk:11-jdk
entrypoint: java
args: ['-jar', 'java-native-image-samples/native-image-samples-client-library/datastore-sample/target/datastore-sample-0.8.0-SNAPSHOT.jar']
args: ['-jar', 'native-image-samples/native-image-samples-client-library/datastore-sample/target/datastore-sample-0.8.0-SNAPSHOT.jar']
env:
- 'DATASTORE_EMULATOR_HOST=http://datastore-emulator:9010'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:
- name: Build with Maven
run: |
mvn clean install -B -q
mvn package -B --file java-native-image-samples/
mvn package -B --file native-image-samples/
- name: Run Samples
run: |
cd java-native-image-samples
cd native-image-samples
java -jar native-image-samples-client-library/pubsub-sample/target/pubsub-sample-0.8.0-SNAPSHOT.jar
java -jar native-image-samples-client-library/trace-sample/target/trace-sample-0.8.0-SNAPSHOT.jar
Expand Down Expand Up @@ -79,9 +79,9 @@ jobs:
run: |
gu install native-image
mvn clean install -B -q
mvn package -P native -B --file java-native-image-samples/native-image-samples-client-library/pubsub-sample
mvn package -P native -B --file native-image-samples/native-image-samples-client-library/pubsub-sample
- name: Run Samples
run: |
cd java-native-image-samples
cd native-image-samples
./native-image-samples-client-library/pubsub-sample/target/com.example.pubsubsampleapplication
2 changes: 1 addition & 1 deletion .kokoro/continuous.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "java-native-image-support/.kokoro/build.sh"
build_file: "native-image-support-java/.kokoro/build.sh"

gfile_resources: "/x20/projects/java-platform/linux-amd64/jdk-11-latest"
2 changes: 1 addition & 1 deletion .kokoro/drop.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "java-native-image-support/.kokoro/drop.sh"
build_file: "native-image-support-java/.kokoro/drop.sh"
2 changes: 1 addition & 1 deletion .kokoro/promote.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "java-native-image-support/.kokoro/promote.sh"
build_file: "native-image-support-java/.kokoro/promote.sh"
2 changes: 1 addition & 1 deletion .kokoro/stage.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "java-native-image-support/.kokoro/stage.sh"
build_file: "native-image-support-java/.kokoro/stage.sh"
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Google Cloud GraalVM Support
# Native Image Support for Google Cloud Libraries

[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)

This repository provides support for applications using the [Google Java Client Libraries](https://github.com/googleapis/google-cloud-java#supported-apis) to be built as [GraalVM Native Images](https://www.graalvm.org/reference-manual/native-image/).

## Setup

Add the `java-native-image-support` artifact to your project to take advantage of native image support.
Add the `native-image-support` artifact to your project to take advantage of native image support.

For example, in Maven:

```
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>java-native-image-support</artifactId>
<artifactId>native-image-support</artifactId>
<version>0.7.0</version>
</dependency>
```
Expand All @@ -22,9 +22,9 @@ This dependency contains the GraalVM configurations to provide out-of-the-box su

### Client Library Versions

To compile with GraalVM (native-image), ensure the client library version in your project is supported by `java-native-image-support`.
To compile with native image, ensure the client library version in your project is supported by `native-image-support`.

| GraalVM Support version | GraalVM Compiler Version | *`libraries-bom` version | `grpc-netty-shaded` version |
| Native Image Support version | GraalVM Compiler Version | *`libraries-bom` version | `grpc-netty-shaded` version |
|-------------------------|--------------------------|:-------------------------|-----------------------------|
| `0.5.0` - `0.7.0` | `>= 21.2.0` | `20.8.0` or later | `1.39.0` or later |
| `0.4.0` | `>= 21.0.0` | `11.0.0` or later | `1.32.1` or later |
Expand All @@ -51,48 +51,48 @@ Command line Example:
native-image -cp <other settings> --features=ProtobufMessageFeature
```

The [Cloud Tasks code sample](java-native-image-samples/native-image-samples-client-library/tasks-sample/pom.xml) demonstrates how to use this setting.
The [Cloud Tasks code sample](native-image-samples/native-image-samples-client-library/tasks-sample/pom.xml) demonstrates how to use this setting.

## Supported Libraries

Most of the Java Google Client Libraries [listed here](https://github.com/googleapis/google-cloud-java#supported-apis) are supported for GraalVM compilation using this dependency.
These libraries are all listed under the `com.google.cloud` group ID.

If you find an unsupported library, please make a feature request via our [Github Issue Tracker](https://github.com/GoogleCloudPlatform/java-native-image-support/issues).
If you find an unsupported library, please make a feature request via our [Github Issue Tracker](https://github.com/GoogleCloudPlatform/native-image-support-java/issues).

GraalVM-compatible sample code using various Google Cloud libraries can be found below:

| Google Cloud Service Library | Sample Link |
|-------------------------|--------------------------|
| [Cloud BigQuery](https://github.com/googleapis/java-bigquery) | [bigquery-sample](./java-native-image-samples/native-image-samples-client-library/bigquery-sample) |
| [Cloud BigTable](https://github.com/googleapis/java-bigtable) | [bigtable-sample](./java-native-image-samples/native-image-samples-client-library/bigtable-sample) |
| [Cloud Datastore](https://github.com/googleapis/java-datastore) | [datastore-sample](./java-native-image-samples/native-image-samples-client-library/datastore-sample) |
| [Cloud Firestore](https://github.com/googleapis/java-firestore) | [firestore-sample](./java-native-image-samples/native-image-samples-client-library/firestore-sample) |
| [Cloud Logging](https://github.com/googleapis/java-logging) | [logging-sample](./java-native-image-samples/native-image-samples-client-library/logging-sample) |
| [Cloud Pub/Sub](https://github.com/googleapis/java-pubsub) | [pubsub-sample](./java-native-image-samples/native-image-samples-client-library/pubsub-sample) |
| [Cloud Secret Manager](https://github.com/googleapis/java-secretmanager) | [secretmanager-sample](./java-native-image-samples/native-image-samples-client-library/secretmanager-sample) |
| [Cloud SQL (w/ MySQL)](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory) | [cloud-sql-sample](./java-native-image-samples/native-image-samples-client-library/cloud-sql-sample) |
| [Cloud Spanner](https://github.com/googleapis/java-spanner) | [spanner-sample](./java-native-image-samples/native-image-samples-client-library/spanner-sample) |
| [Cloud Storage](https://github.com/googleapis/java-storage) | [storage-sample](./java-native-image-samples/native-image-samples-client-library/storage-sample) |
| [Cloud Tasks](https://github.com/googleapis/java-tasks) | [tasks-sample](./java-native-image-samples/native-image-samples-client-library/tasks-sample) |
| [Cloud BigQuery](https://github.com/googleapis/java-bigquery) | [bigquery-sample](./native-image-samples/native-image-samples-client-library/bigquery-sample) |
| [Cloud BigTable](https://github.com/googleapis/java-bigtable) | [bigtable-sample](./native-image-samples/native-image-samples-client-library/bigtable-sample) |
| [Cloud Datastore](https://github.com/googleapis/java-datastore) | [datastore-sample](./native-image-samples/native-image-samples-client-library/datastore-sample) |
| [Cloud Firestore](https://github.com/googleapis/java-firestore) | [firestore-sample](./native-image-samples/native-image-samples-client-library/firestore-sample) |
| [Cloud Logging](https://github.com/googleapis/java-logging) | [logging-sample](./native-image-samples/native-image-samples-client-library/logging-sample) |
| [Cloud Pub/Sub](https://github.com/googleapis/java-pubsub) | [pubsub-sample](./native-image-samples/native-image-samples-client-library/pubsub-sample) |
| [Cloud Secret Manager](https://github.com/googleapis/java-secretmanager) | [secretmanager-sample](./native-image-samples/native-image-samples-client-library/secretmanager-sample) |
| [Cloud SQL (w/ MySQL)](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory) | [cloud-sql-sample](./native-image-samples/native-image-samples-client-library/cloud-sql-sample) |
| [Cloud Spanner](https://github.com/googleapis/java-spanner) | [spanner-sample](./native-image-samples/native-image-samples-client-library/spanner-sample) |
| [Cloud Storage](https://github.com/googleapis/java-storage) | [storage-sample](./native-image-samples/native-image-samples-client-library/storage-sample) |
| [Cloud Tasks](https://github.com/googleapis/java-tasks) | [tasks-sample](./native-image-samples/native-image-samples-client-library/tasks-sample) |

Additional API compatibility is in active development.

Please also consult the project [samples applications directory](./java-native-image-samples) for the full range of code samples.
Please also consult the project [samples applications directory](./native-image-samples) for the full range of code samples.

### Additional Frameworks

Our project `java-native-image-support` targets compatibility for native image frameworks as well, such as for Quarkus, Micronaut, and Spring.
We are in the early stages of research for these frameworks and maintain some [code samples](./java-native-image-samples).
Our project targets compatibility for native image frameworks as well, such as for Quarkus, Micronaut, and Spring.
We are in the early stages of research for these frameworks and maintain some [code samples](./native-image-samples).

We are also interested in collaborating with other open source projects to improve framework-level compatibility.

Related projects:

* [Quarkus Extension for Google Cloud Services](https://github.com/quarkiverse/quarkiverse-google-cloud-services) - Enables usage of Google Cloud libraries in Quarkus applications.

Please let us know if you are interested in collaborating by contacting us via our [Issue Tracker](https://github.com/GoogleCloudPlatform/java-native-image-support/issues).
Please let us know if you are interested in collaborating by contacting us via our [Issue Tracker](https://github.com/GoogleCloudPlatform/native-image-support-java/issues).

## Questions

Please report any issues and questions to our [Github Issue Tracker](https://github.com/GoogleCloudPlatform/java-native-image-support/issues).
Please report any issues and questions to our [Github Issue Tracker](https://github.com/GoogleCloudPlatform/native-image-support-java/issues).
Loading

0 comments on commit a7eb979

Please sign in to comment.