Skip to content

Commit b2aeb1a

Browse files
authored
deps: update dependency com.google.cloud:native-image-support to v0.12.4 (#882)
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:native-image-support](https://togithub.com/googleapis/java-core) | `0.10.0` -> `0.12.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.4/compatibility-slim/0.10.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.4/confidence-slim/0.10.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-firestore).
1 parent a01fe88 commit b2aeb1a

File tree

5 files changed

+14
-22
lines changed

5 files changed

+14
-22
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-firestore/tre
106106

107107
| Sample | Source Code | Try it |
108108
| --------------------------- | --------------------------------- | ------ |
109+
| Native Image Firestore Sample | [source code](https://github.com/googleapis/java-firestore/blob/main/samples/native-image-sample/src/main/java/com/example/firestore/NativeImageFirestoreSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-firestore&page=editor&open_in_editor=samples/native-image-sample/src/main/java/com/example/firestore/NativeImageFirestoreSample.java) |
110+
| Person | [source code](https://github.com/googleapis/java-firestore/blob/main/samples/native-image-sample/src/main/java/com/example/firestore/Person.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-firestore&page=editor&open_in_editor=samples/native-image-sample/src/main/java/com/example/firestore/Person.java) |
109111
| Quickstart | [source code](https://github.com/googleapis/java-firestore/blob/main/samples/snippets/src/main/java/com/example/firestore/Quickstart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-firestore&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/firestore/Quickstart.java) |
110112
| Listen Data Snippets | [source code](https://github.com/googleapis/java-firestore/blob/main/samples/snippets/src/main/java/com/example/firestore/snippets/ListenDataSnippets.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-firestore&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/firestore/snippets/ListenDataSnippets.java) |
111113
| Manage Data Snippets | [source code](https://github.com/googleapis/java-firestore/blob/main/samples/snippets/src/main/java/com/example/firestore/snippets/ManageDataSnippets.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-firestore&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/firestore/snippets/ManageDataSnippets.java) |

samples/native-image-sample/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
8383
<dependency>
8484
<groupId>com.google.cloud</groupId>
8585
<artifactId>native-image-support</artifactId>
86-
<version>0.10.0</version>
86+
<version>0.12.4</version>
8787
</dependency>
8888
<dependency>
8989
<groupId>org.junit.vintage</groupId>

samples/native-image-sample/src/main/java/com/example/firestore/NativeImageFirestoreSample.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,12 @@
3232
import java.util.List;
3333
import java.util.Map;
3434

35-
/**
36-
* Sample Firestore application demonstrating basic operations.
37-
*/
35+
/** Sample Firestore application demonstrating basic operations. */
3836
public class NativeImageFirestoreSample {
3937

4038
private static final String USERS_COLLECTION = "nativeimage_test_users";
4139

42-
/**
43-
* Entrypoint to the Firestore sample application.
44-
*/
40+
/** Entrypoint to the Firestore sample application. */
4541
public static void main(String[] args) throws Exception {
4642
Instant startTime = Instant.now();
4743
FirestoreOptions firestoreOptions = FirestoreOptions.getDefaultInstance();
@@ -79,9 +75,7 @@ static void createUserDocument(Firestore db) throws Exception {
7975
static void createUserDocumentPojo(Firestore db) throws Exception {
8076
CollectionReference collectionReference = db.collection(USERS_COLLECTION);
8177
WriteResult result =
82-
collectionReference.document()
83-
.set(new Person("Alan", "Turing", 1912))
84-
.get();
78+
collectionReference.document().set(new Person("Alan", "Turing", 1912)).get();
8579

8680
System.out.println("Created user by POJO. Timestamp: " + result.getUpdateTime());
8781
}
@@ -99,12 +93,11 @@ static void runSampleQueries(Firestore db) throws Exception {
9993
runQuery(db.collection(USERS_COLLECTION).whereLessThan("born", 1900));
10094
System.out.println("Number of users born before 1900: " + results.size());
10195

102-
results = runQuery(
103-
db.collection(USERS_COLLECTION).whereGreaterThan(FieldPath.of("born"), 1900));
96+
results =
97+
runQuery(db.collection(USERS_COLLECTION).whereGreaterThan(FieldPath.of("born"), 1900));
10498
System.out.println("Number of users born earlier after 1900: " + results.size());
10599

106-
results = runQuery(
107-
db.collection(USERS_COLLECTION).whereEqualTo("name", "Ada"));
100+
results = runQuery(db.collection(USERS_COLLECTION).whereEqualTo("name", "Ada"));
108101
System.out.println("Number of users whose first name is 'Ada': " + results.size());
109102
}
110103

@@ -124,4 +117,4 @@ private static void printUsers(Iterable<QueryDocumentSnapshot> documents) {
124117
document.getLong("born"));
125118
}
126119
}
127-
}
120+
}

samples/native-image-sample/src/main/java/com/example/firestore/Person.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@
1818

1919
import com.google.cloud.firestore.annotation.DocumentId;
2020

21-
/**
22-
* Simple document object to load into Firestore.
23-
*/
21+
/** Simple document object to load into Firestore. */
2422
public class Person {
2523

26-
@DocumentId
27-
public String id;
24+
@DocumentId public String id;
2825

2926
public String first;
3027

@@ -37,4 +34,4 @@ public class Person {
3734
this.last = last;
3835
this.born = born;
3936
}
40-
}
37+
}

samples/native-image-sample/src/test/java/com/example/firestore/ITNativeImageFirestoreSample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ public void testRunSampleQueries() throws Exception {
6161
assertThat(output).contains("Number of users born earlier after 1900: 0");
6262
assertThat(output).contains("Number of users whose first name is 'Ada': 0");
6363
}
64-
}
64+
}

0 commit comments

Comments
 (0)