Skip to content

Commit

Permalink
chore(deps): update dependencies com.google.googlejavaformat:google-j…
Browse files Browse the repository at this point in the history
…ava-format to v1.11.0 and com.coveo:fmt-maven-plugin to v2.12 (#7514)

* chore(deps): update dependency com.google.googlejavaformat:google-java-format to v1.11.0

* chore: upgrade fmt-maven-plugin

* chore(deps): update dependency com.coveo:fmt-maven-plugin to v2.12

* chore(deps): update dependency com.coveo:fmt-maven-plugin to v2.12

* chore(deps): update dependency com.coveo:fmt-maven-plugin to v2.12

* chore(deps): update dependency com.coveo:fmt-maven-plugin to v2.12

* chore(deps): update dependency com.coveo:fmt-maven-plugin to v2.12

* Use Java 11 for Kokoro: Format

* Format code

Co-authored-by: Chanseok Oh <chanseok@google.com>
  • Loading branch information
renovate-bot and chanseokoh committed Nov 10, 2021
1 parent 731db74 commit 7e04654
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .kokoro/presubmit/lint.cfg
Expand Up @@ -4,7 +4,7 @@

env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
}

env_vars: {
Expand Down
4 changes: 2 additions & 2 deletions google-api-grpc/pom.xml
Expand Up @@ -96,7 +96,7 @@
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
<version>2.12</version>
<configuration>
<style>google</style>
<verbose>true</verbose>
Expand All @@ -105,7 +105,7 @@
<dependency>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format</artifactId>
<version>1.7</version>
<version>1.11.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-clients/pom.xml
Expand Up @@ -172,7 +172,7 @@
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
<version>2.12</version>
<configuration>
<style>google</style>
<verbose>true</verbose>
Expand All @@ -181,7 +181,7 @@
<dependency>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format</artifactId>
<version>1.7</version>
<version>1.11.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-examples/pom.xml
Expand Up @@ -241,7 +241,7 @@
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
<version>2.12</version>
<configuration>
<style>google</style>
<verbose>true</verbose>
Expand All @@ -250,7 +250,7 @@
<dependency>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format</artifactId>
<version>1.7</version>
<version>1.11.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Expand Up @@ -36,8 +36,7 @@ public static void enableLifecycleManagement(String projectId, String bucketName
// See the LifecycleRule documentation for additional info on what you can do with lifecycle
// management rules. This one deletes objects that are over 100 days old.
// https://googleapis.dev/java/google-cloud-clients/latest/com/google/cloud/storage/BucketInfo.LifecycleRule.html
bucket
.toBuilder()
bucket.toBuilder()
.setLifecycleRules(
ImmutableList.of(
new LifecycleRule(
Expand Down
Expand Up @@ -34,8 +34,7 @@ public static void makeBucketPublic(String projectId, String bucketName) {
Policy originalPolicy = storage.getIamPolicy(bucketName);
storage.setIamPolicy(
bucketName,
originalPolicy
.toBuilder()
originalPolicy.toBuilder()
.addIdentity(StorageRoles.objectViewer(), Identity.allUsers()) // All users can view
.build());

Expand Down
Expand Up @@ -33,8 +33,7 @@ public static void setPublicAccessPreventionEnforced(String projectId, String bu
Bucket bucket = storage.get(bucketName);

// Enforces public access prevention for the bucket
bucket
.toBuilder()
bucket.toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.ENFORCED)
Expand Down
Expand Up @@ -33,8 +33,7 @@ public static void setPublicAccessPreventionInherited(String projectId, String b
Bucket bucket = storage.get(bucketName);

// Sets public access prevention to 'inherited' for the bucket
bucket
.toBuilder()
bucket.toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.INHERITED)
Expand Down
Expand Up @@ -33,8 +33,7 @@ public static void setPublicAccessPreventionUnspecified(String projectId, String
Bucket bucket = storage.get(bucketName);

// Sets public access prevention to 'unspecified' for the bucket
bucket
.toBuilder()
bucket.toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.UNSPECIFIED)
Expand Down
Expand Up @@ -221,8 +221,7 @@ public void testGetBucketMetadata() {
Bucket bucket =
storage.get(BUCKET, Storage.BucketGetOption.fields(Storage.BucketField.values()));
bucket =
bucket
.toBuilder()
bucket.toBuilder()
.setLabels(ImmutableMap.of("k", "v"))
.setLifecycleRules(
ImmutableList.of(
Expand Down Expand Up @@ -292,9 +291,7 @@ public void testEnableLifecycleManagement() {

@Test
public void testDisableLifecycleManagement() {
storage
.get(BUCKET)
.toBuilder()
storage.get(BUCKET).toBuilder()
.setLifecycleRules(
ImmutableList.of(
new BucketInfo.LifecycleRule(
Expand All @@ -312,9 +309,7 @@ public void testGetPublicAccessPrevention() {
try {
// By default a bucket PAP state is INHERITED and we are changing the state to validate
// non-default state.
storage
.get(BUCKET)
.toBuilder()
storage.get(BUCKET).toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.ENFORCED)
Expand All @@ -328,20 +323,16 @@ public void testGetPublicAccessPrevention() {
String snippetOutput = snippetOutputCapture.toString();
System.setOut(standardOut);
assertTrue(snippetOutput.contains("enforced"));
storage
.get(BUCKET)
.toBuilder()
storage.get(BUCKET).toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.INHERITED)
.build())
.build()
.update();
} finally {
// No matter what happens make sure test set bucket back to INHERITED
storage
.get(BUCKET)
.toBuilder()
// No matter what happens make sure test set bucket back to UNSPECIFIED
storage.get(BUCKET).toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.INHERITED)
Expand All @@ -358,20 +349,16 @@ public void testSetPublicAccessPreventionEnforced() {
assertEquals(
storage.get(BUCKET).getIamConfiguration().getPublicAccessPrevention(),
BucketInfo.PublicAccessPrevention.ENFORCED);
storage
.get(BUCKET)
.toBuilder()
storage.get(BUCKET).toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.INHERITED)
.build())
.build()
.update();
} finally {
// No matter what happens make sure test set bucket back to INHERITED
storage
.get(BUCKET)
.toBuilder()
// No matter what happens make sure test set bucket back to UNSPECIFIED
storage.get(BUCKET).toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.INHERITED)
Expand All @@ -384,9 +371,7 @@ public void testSetPublicAccessPreventionEnforced() {
@Test
public void testSetPublicAccessPreventionInherited() {
try {
storage
.get(BUCKET)
.toBuilder()
storage.get(BUCKET).toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.ENFORCED)
Expand All @@ -398,10 +383,8 @@ public void testSetPublicAccessPreventionInherited() {
storage.get(BUCKET).getIamConfiguration().getPublicAccessPrevention(),
BucketInfo.PublicAccessPrevention.INHERITED);
} finally {
// No matter what happens make sure test set bucket back to INHERITED
storage
.get(BUCKET)
.toBuilder()
// No matter what happens make sure test set bucket back to UNSPECIFIED
storage.get(BUCKET).toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.INHERITED)
Expand Down Expand Up @@ -458,9 +441,7 @@ public void testMakeBucketPublic() {

@Test
public void deleteBucketDefaultKmsKey() {
storage
.get(BUCKET)
.toBuilder()
storage.get(BUCKET).toBuilder()
.setDefaultKmsKeyName(
"projects/gcloud-devel/locations/global/keyRings/gcs_kms_key_ring/cryptoKeys/key")
.build()
Expand Down Expand Up @@ -500,9 +481,7 @@ public void testConfigureBucketCors() {

@Test
public void testRemoveBucketCors() {
storage
.get(BUCKET)
.toBuilder()
storage.get(BUCKET).toBuilder()
.setCors(
ImmutableList.of(
Cors.newBuilder()
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-testing/pom.xml
Expand Up @@ -127,7 +127,7 @@
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
<version>2.12</version>
<configuration>
<style>google</style>
<verbose>true</verbose>
Expand All @@ -136,7 +136,7 @@
<dependency>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format</artifactId>
<version>1.7</version>
<version>1.11.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-util/pom.xml
Expand Up @@ -61,7 +61,7 @@
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
<version>2.12</version>
<configuration>
<style>google</style>
<verbose>true</verbose>
Expand All @@ -70,7 +70,7 @@
<dependency>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format</artifactId>
<version>1.7</version>
<version>1.11.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -101,7 +101,7 @@
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
<version>2.12</version>
<configuration>
<style>google</style>
<verbose>true</verbose>
Expand Down

0 comments on commit 7e04654

Please sign in to comment.