Skip to content

Commit

Permalink
Fix io-gcp requiring hamcrest dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Abacn committed Mar 12, 2024
1 parent 986f67f commit 2ec11a1
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 19 deletions.
15 changes: 0 additions & 15 deletions sdks/java/harness/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,9 @@ applyJavaNature(
automaticModuleName: 'org.apache.beam.fn.harness',
testShadowJar: true,
shadowJarValidationExcludes: [
"avro/shaded/com/google/**",
"com/thoughtworks/paranamer/**",
"junit/**",
"io/github/classgraph/**",
"nonapi/io/github/classgraph/**",
"org/apache/avro/**",
"org/apache/beam/fn/harness/**",
"org/apache/beam/model/fnexecution/**",
"org/apache/beam/runners/core/**",
"org/apache/beam/runners/core/construction/**",
"org/apache/beam/sdk/extensions/avro/**",
"org/apache/beam/sdk/fn/**",
"org/apache/commons/**",
"org/checkerframework/**",
"org/codehaus/jackson/**",
"org/hamcrest/**",
"org/junit/**",
"org/tukaani/xz/**",
],
shadowClosure:
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import com.google.auto.service.AutoService;
import org.apache.beam.sdk.annotations.Internal;
import org.apache.beam.sdk.io.gcp.bigquery.BigQueryOptions;
import org.apache.beam.sdk.io.gcp.bigquery.TestBigQueryOptions;
import org.apache.beam.sdk.io.gcp.bigtable.changestreams.BigtableChangeStreamTestOptions;
import org.apache.beam.sdk.io.gcp.firestore.FirestoreOptions;
import org.apache.beam.sdk.io.gcp.pubsub.PubsubOptions;
import org.apache.beam.sdk.options.PipelineOptions;
Expand All @@ -38,8 +36,6 @@ public Iterable<Class<? extends PipelineOptions>> getPipelineOptions() {
.add(BigQueryOptions.class)
.add(PubsubOptions.class)
.add(FirestoreOptions.class)
.add(TestBigQueryOptions.class)
.add(BigtableChangeStreamTestOptions.class)
.build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.beam.sdk.io.gcp.bigquery;

import com.google.auto.service.AutoService;
import org.apache.beam.sdk.annotations.Internal;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsRegistrar;
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;

@AutoService(PipelineOptionsRegistrar.class)
@Internal
public class TestBigQueryOptionsRegistrar implements PipelineOptionsRegistrar {
@Override
public Iterable<Class<? extends PipelineOptions>> getPipelineOptions() {
return ImmutableList.<Class<? extends PipelineOptions>>builder()
.add(TestBigQueryOptions.class)
.build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.beam.sdk.io.gcp.bigtable.changestreams;

import com.google.auto.service.AutoService;
import org.apache.beam.sdk.annotations.Internal;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsRegistrar;
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;

@AutoService(PipelineOptionsRegistrar.class)
@Internal
public class BigtableChangeStreamTestOptionsRegistrar implements PipelineOptionsRegistrar {
@Override
public Iterable<Class<? extends PipelineOptions>> getPipelineOptions() {
return ImmutableList.<Class<? extends PipelineOptions>>builder()
.add(BigtableChangeStreamTestOptions.class)
.build();
}
}

0 comments on commit 2ec11a1

Please sign in to comment.