Skip to content

Commit

Permalink
Do not build shadowjar and disable javadoc for it modules (#31741)
Browse files Browse the repository at this point in the history
* add missing transitive dependencies

* Fix analyzeClassesDependencies
  • Loading branch information
Abacn authored Jul 2, 2024
1 parent be900f9 commit 45733be
Show file tree
Hide file tree
Showing 13 changed files with 105 additions and 41 deletions.
14 changes: 11 additions & 3 deletions it/cassandra/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,30 @@

plugins { id 'org.apache.beam.module' }
applyJavaNature(
automaticModuleName: 'org.apache.beam.it.cassandra',
automaticModuleName: 'org.apache.beam.it.cassandra',
exportJavadoc: false,
)

description = "Apache Beam :: IT :: Cassandra"
ext.summary = "Integration test utilities for Cassandra."

dependencies {
implementation project(path: ":it:testcontainers", configuration: "shadow")
implementation project(path: ":it:truthmatchers", configuration: "shadow")
implementation project(path: ":it:common")
implementation project(path: ":it:testcontainers")
implementation project(path: ":it:truthmatchers")
implementation library.java.failsafe
implementation library.java.slf4j_api
implementation library.java.testcontainers_base
implementation library.java.testcontainers_cassandra
implementation library.java.vendored_guava_32_1_2_jre
implementation 'com.datastax.oss:java-driver-core:4.15.0'

// TODO: excluding Guava until Truth updates it to >32.1.x
testImplementation(library.java.truth) {
exclude group: 'com.google.guava', module: 'guava'
}
implementation library.java.guava
permitUsedUndeclared library.java.guava
testImplementation library.java.mockito_core
testRuntimeOnly library.java.slf4j_simple
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
import com.datastax.oss.driver.api.core.cql.ResultSet;
import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import dev.failsafe.Failsafe;
import dev.failsafe.RetryPolicy;
import java.net.InetSocketAddress;
Expand All @@ -36,6 +34,8 @@
import org.apache.beam.it.common.ResourceManager;
import org.apache.beam.it.common.utils.ExceptionUtils;
import org.apache.beam.it.testcontainers.TestContainerResourceManager;
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.annotations.VisibleForTesting;
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.containers.CassandraContainer;
Expand Down
2 changes: 0 additions & 2 deletions it/common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ plugins { id 'org.apache.beam.module' }
applyJavaNature(
exportJavadoc: false,
automaticModuleName: 'org.apache.beam.it.common',
validateShadowJar: false,
shadowClosure: {},
)

description = "Apache Beam :: IT :: Common"
Expand Down
3 changes: 1 addition & 2 deletions it/conditions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
plugins { id 'org.apache.beam.module' }
applyJavaNature(
automaticModuleName: 'org.apache.beam.it.conditions',
validateShadowJar: false,
shadowClosure: {},
exportJavadoc: false,
)

description = "Apache Beam :: IT :: Conditions"
Expand Down
12 changes: 10 additions & 2 deletions it/elasticsearch/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

plugins { id 'org.apache.beam.module' }
applyJavaNature(
automaticModuleName: 'org.apache.beam.it.elasticsearch',
automaticModuleName: 'org.apache.beam.it.elasticsearch',
exportJavadoc: false,
)

description = "Apache Beam :: IT :: Elasticsearch"
Expand All @@ -27,15 +28,22 @@ ext.summary = "Integration test utilities for Elasticsearch."
def elastic_search_version = "7.9.2"

dependencies {
implementation project(path: ":it:testcontainers", configuration: "shadow")
implementation project(path: ":it:common")
implementation project(path: ":it:testcontainers")
implementation library.java.http_core
implementation library.java.slf4j_api
implementation library.java.testcontainers_base
implementation library.java.testcontainers_elasticsearch
implementation library.java.vendored_guava_32_1_2_jre
implementation "org.elasticsearch.client:elasticsearch-rest-high-level-client:$elastic_search_version"
implementation "org.elasticsearch.client:elasticsearch-rest-client:$elastic_search_version"
implementation "org.elasticsearch:elasticsearch:$elastic_search_version"
// TODO: excluding Guava until Truth updates it to >32.1.x
testImplementation(library.java.truth) {
exclude group: 'com.google.guava', module: 'guava'
}
testImplementation library.java.guava
permitUsedUndeclared library.java.guava
testImplementation library.java.mockito_inline
testImplementation library.java.commons_lang3
testRuntimeOnly library.java.slf4j_simple
Expand Down
23 changes: 18 additions & 5 deletions it/google-cloud-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import groovy.json.JsonOutput

import org.apache.beam.gradle.IoPerformanceTestUtilities

plugins { id 'org.apache.beam.module' }
applyJavaNature(
automaticModuleName: 'org.apache.beam.it.gcp',
automaticModuleName: 'org.apache.beam.it.gcp',
exportJavadoc: false,
)

description = "Apache Beam :: IT :: Google Cloud Platform"
Expand All @@ -30,10 +31,17 @@ dependencies {
implementation enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
implementation project(path: ":sdks:java:core", configuration: "shadow")
implementation project(path: ":runners:google-cloud-dataflow-java")
implementation project(path: ":it:conditions", configuration: "shadow")
implementation project(path: ":it:truthmatchers", configuration: "shadow")
implementation project(path: ":it:common")
implementation project(path: ":it:conditions")
implementation project(path: ":it:truthmatchers")
implementation project(path: ":sdks:java:testing:test-utils")
implementation library.java.failsafe
implementation library.java.google_api_services_dataflow
implementation library.java.junit
implementation library.java.slf4j_api
implementation(library.java.truth) {
exclude group: 'com.google.guava', module: 'guava'
}
implementation library.java.vendored_guava_32_1_2_jre
implementation library.java.jackson_core
implementation library.java.jackson_databind
Expand All @@ -45,13 +53,18 @@ dependencies {
implementation 'org.apache.commons:commons-lang3:3.9'
implementation library.java.gax
implementation library.java.google_api_common
implementation library.java.google_api_client
implementation library.java.google_api_services_bigquery
implementation library.java.google_auth_library_credentials
implementation library.java.google_auth_library_oauth2_http
implementation library.java.google_http_client
implementation library.java.guava
implementation library.java.protobuf_java_util
implementation library.java.protobuf_java
implementation library.java.threetenbp
implementation 'org.awaitility:awaitility:4.2.0'
implementation 'joda-time:joda-time:2.10.10'
// Google Cloud Dependencies
implementation library.java.google_api_services_bigquery
implementation library.java.google_cloud_core
implementation 'com.google.cloud:google-cloud-storage'
implementation 'com.google.cloud:google-cloud-bigquery'
Expand Down
14 changes: 11 additions & 3 deletions it/jdbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,34 @@

plugins { id 'org.apache.beam.module' }
applyJavaNature(
automaticModuleName: 'org.apache.beam.it.jdbc',
enableSpotbugs: false,
automaticModuleName: 'org.apache.beam.it.jdbc',
exportJavadoc: false,
enableSpotbugs: false,
)

description = "Apache Beam :: IT :: Jdbc"
ext.summary = "Integration test utilities for Jdbc."

dependencies {
implementation project(path: ":it:testcontainers", configuration: "shadow")
implementation project(path: ":it:common")
implementation project(path: ":it:testcontainers")
implementation library.java.commons_lang3
implementation library.java.slf4j_api
implementation library.java.testcontainers_base
implementation library.java.testcontainers_jdbc
implementation library.java.testcontainers_postgresql
implementation library.java.testcontainers_mysql
implementation library.java.testcontainers_oracle
implementation library.java.testcontainers_mssqlserver
implementation library.java.vendored_guava_32_1_2_jre

testImplementation project(":it:truthmatchers")
// TODO: excluding Guava until Truth updates it to >32.1.x
testImplementation(library.java.truth) {
exclude group: 'com.google.guava', module: 'guava'
}
testImplementation library.java.guava
permitUsedUndeclared library.java.guava
testImplementation library.java.mockito_core
testImplementation library.java.mockito_inline
testRuntimeOnly library.java.slf4j_simple
Expand Down
13 changes: 10 additions & 3 deletions it/kafka/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,27 @@ import org.apache.beam.gradle.IoPerformanceTestUtilities

plugins { id 'org.apache.beam.module' }
applyJavaNature(
automaticModuleName: 'org.apache.beam.it.kafka',
automaticModuleName: 'org.apache.beam.it.kafka',
exportJavadoc: false,
)

description = "Apache Beam :: IT :: Kafka"
ext.summary = "Integration test utilities for Kafka."

dependencies {
implementation project(path: ":it:testcontainers", configuration: "shadow")
implementation project(path: ":it:common")
implementation project(path: ":it:testcontainers")
implementation library.java.slf4j_api
implementation library.java.testcontainers_base
implementation library.java.testcontainers_kafka
implementation library.java.kafka_clients

implementation library.java.vendored_guava_32_1_2_jre
// TODO: excluding Guava until Truth updates it to >32.1.x
testImplementation(library.java.truth) {
exclude group: 'com.google.guava', module: 'guava'
}
testImplementation library.java.guava
permitUsedUndeclared library.java.guava
testImplementation library.java.mockito_core
testRuntimeOnly library.java.slf4j_simple
// TODO: Remove the below dependencies after KafkaIOLT has been moved to the right directory.
Expand All @@ -44,6 +50,7 @@ dependencies {
testImplementation project(path: ":runners:google-cloud-dataflow-java")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation project(path: ":sdks:java:extensions:google-cloud-platform-core", configuration: "testRuntimeMigration")
testImplementation library.java.google_api_services_dataflow
}

tasks.register(
Expand Down
16 changes: 12 additions & 4 deletions it/mongodb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,32 @@

plugins { id 'org.apache.beam.module' }
applyJavaNature(
automaticModuleName: 'org.apache.beam.it.mongodb',
automaticModuleName: 'org.apache.beam.it.mongodb',
exportJavadoc: false,
)

description = "Apache Beam :: IT :: MongoDB"
ext.summary = "Integration test utilities for MongoDB."

dependencies {
implementation project(path: ":it:testcontainers", configuration: "shadow")
implementation project(path: ":it:conditions", configuration: "shadow")
implementation project(path: ":it:truthmatchers", configuration: "shadow")
implementation project(path: ":it:common")
implementation project(path: ":it:testcontainers")
implementation project(path: ":it:conditions")
implementation project(path: ":it:truthmatchers")
implementation library.java.slf4j_api
implementation library.java.testcontainers_base
implementation library.java.testcontainers_mongodb
implementation library.java.google_code_gson
implementation library.java.mongo_java_driver
implementation library.java.vendored_guava_32_1_2_jre

testImplementation library.java.mockito_core
// TODO: excluding Guava until Truth updates it to >32.1.x
testImplementation(library.java.truth) {
exclude group: 'com.google.guava', module: 'guava'
}
testImplementation library.java.guava
permitUsedUndeclared library.java.guava
testImplementation library.java.commons_lang3
testRuntimeOnly library.java.slf4j_simple
}
11 changes: 8 additions & 3 deletions it/neo4j/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,20 @@

plugins { id 'org.apache.beam.module' }
applyJavaNature(
automaticModuleName: 'org.apache.beam.it.neo4j',
automaticModuleName: 'org.apache.beam.it.neo4j',
exportJavadoc: false,
)

description = "Apache Beam :: IT :: Neo4j"
ext.summary = "Integration test utilities for Neo4j."

dependencies {
implementation project(path: ":it:testcontainers", configuration: "shadow")
implementation project(path: ":it:conditions", configuration: "shadow")
implementation project(path: ":it:common")
implementation project(path: ":it:testcontainers")
implementation project(path: ":it:conditions")
implementation library.java.guava
implementation library.java.slf4j_api
implementation library.java.testcontainers_base
implementation library.java.testcontainers_neo4j
implementation "org.neo4j.driver:neo4j-java-driver:4.4.3"

Expand Down
17 changes: 13 additions & 4 deletions it/splunk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
plugins { id 'org.apache.beam.module' }
applyJavaNature(
automaticModuleName: 'org.apache.beam.it.splunk',
exportJavadoc: false,
)

description = "Apache Beam :: IT :: Splunk"
Expand All @@ -32,19 +33,27 @@ repositories {
}

dependencies {
implementation project(path: ":it:testcontainers", configuration: "shadow")
implementation project(path: ":it:conditions", configuration: "shadow")
implementation project(path: ":it:truthmatchers", configuration: "shadow")
implementation project(path: ":it:common")
implementation project(path: ":it:testcontainers")
implementation project(path: ":it:conditions")
implementation project(path: ":it:truthmatchers")
implementation project(path: ":sdks:java:io:splunk")
implementation library.java.http_core
implementation library.java.http_client
provided library.java.json_org
implementation library.java.slf4j_api
implementation library.java.testcontainers_base
implementation library.java.vendored_guava_32_1_2_jre
implementation 'com.splunk:splunk:1.9.4'
implementation 'org.awaitility:awaitility:4.2.0'
provided library.java.json_org

testImplementation library.java.mockito_core
// TODO: excluding Guava until Truth updates it to >32.1.x
testImplementation(library.java.truth) {
exclude group: 'com.google.guava', module: 'guava'
}
testImplementation library.java.guava
permitUsedUndeclared library.java.guava
testImplementation library.java.commons_lang3
testRuntimeOnly library.java.slf4j_simple
}
8 changes: 5 additions & 3 deletions it/testcontainers/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,23 @@
plugins { id 'org.apache.beam.module' }
applyJavaNature(
automaticModuleName: 'org.apache.beam.it.testcontainers',
exportJavadoc: false,
enableSpotbugs: false,
validateShadowJar: false,
shadowClosure: {},
)

description = "Apache Beam :: IT :: Testcontainers"
ext.summary = "Integration test utilities for Testcontainers."

dependencies {
implementation project(path: ":it:common", configuration: "shadow")
implementation project(path: ":it:common")
implementation library.java.slf4j_api
implementation library.java.testcontainers_base
// TODO: excluding Guava until Truth updates it to >32.1.x
testImplementation(library.java.truth) {
exclude group: 'com.google.guava', module: 'guava'
}
implementation library.java.guava
permitUsedUndeclared library.java.guava
testImplementation library.java.mockito_core
testRuntimeOnly library.java.slf4j_simple
}
9 changes: 4 additions & 5 deletions it/truthmatchers/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@ plugins { id 'org.apache.beam.module' }
applyJavaNature(
exportJavadoc: false,
automaticModuleName: 'org.apache.beam.it.truthmatchers',
validateShadowJar: false,
shadowClosure: {},
)

description = "Apache Beam :: IT :: Truth matchers"
ext.summary = "Truth matchers for integration tests."

dependencies {
implementation project(path: ":it:common", configuration: "shadow")
implementation project(path: ":it:common")
// TODO: excluding Guava until Truth updates it to >32.1.x
implementation(library.java.truth) {
exclude group: 'com.google.guava', module: 'guava'
}
implementation library.java.vendored_guava_32_1_2_jre
permitUnusedDeclared library.java.vendored_guava_32_1_2_jre
implementation library.java.guava
permitUsedUndeclared library.java.guava
implementation library.java.google_code_gson
}

0 comments on commit 45733be

Please sign in to comment.