2024-01-23 17:49:23 -06:00
|
|
|
plugins {
|
|
|
|
id 'java-library'
|
|
|
|
id 'pegasus'
|
2024-09-16 18:37:36 -05:00
|
|
|
id 'io.ebean' version "${ebeanVersion}" // Use the latest version from global build.gradle
|
2025-03-13 10:17:14 -05:00
|
|
|
id 'java-test-fixtures'
|
2024-01-23 17:49:23 -06:00
|
|
|
}
|
2021-06-03 13:24:33 -07:00
|
|
|
|
2024-12-03 06:57:43 +05:30
|
|
|
apply from: '../gradle/coverage/java-coverage.gradle'
|
|
|
|
|
2021-06-03 13:24:33 -07:00
|
|
|
configurations {
|
|
|
|
enhance
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-09-01 09:06:01 -05:00
|
|
|
implementation project(':entity-registry')
|
2024-02-28 16:57:26 -06:00
|
|
|
implementation project(':metadata-service:auth-config')
|
2024-05-09 14:56:03 -05:00
|
|
|
api project(':metadata-io:metadata-io-api')
|
2023-09-01 09:06:01 -05:00
|
|
|
api project(':metadata-utils')
|
2023-10-18 13:45:46 -05:00
|
|
|
api project(':metadata-events:mxe-avro')
|
2023-09-01 09:06:01 -05:00
|
|
|
api project(':metadata-events:mxe-registration')
|
2023-10-18 13:45:46 -05:00
|
|
|
api project(':metadata-events:mxe-utils-avro')
|
2023-09-01 09:06:01 -05:00
|
|
|
api project(':metadata-models')
|
2024-03-23 06:15:36 -05:00
|
|
|
api project(':metadata-service:restli-client-api')
|
2023-09-01 09:06:01 -05:00
|
|
|
api project(':metadata-service:configuration')
|
|
|
|
api project(':metadata-service:services')
|
2024-02-28 16:57:26 -06:00
|
|
|
api project(':metadata-operation-context')
|
2023-09-01 09:06:01 -05:00
|
|
|
|
2024-07-16 16:56:51 -05:00
|
|
|
implementation spec.product.pegasus.restliServer
|
2023-09-01 09:06:01 -05:00
|
|
|
implementation spec.product.pegasus.data
|
|
|
|
implementation spec.product.pegasus.generator
|
|
|
|
|
|
|
|
implementation externalDependency.guava
|
|
|
|
implementation externalDependency.reflections
|
2024-05-08 20:39:31 -05:00
|
|
|
|
2023-11-14 19:00:22 -06:00
|
|
|
api(externalDependency.dgraph4j) {
|
|
|
|
exclude group: 'com.google.guava', module: 'guava'
|
|
|
|
exclude group: 'io.grpc', module: 'grpc-protobuf'
|
|
|
|
}
|
2025-01-23 10:45:40 -06:00
|
|
|
implementation externalDependency.dgraphNetty
|
2025-04-21 16:39:26 -05:00
|
|
|
implementation externalDependency.dgraphShadedNetty
|
2022-12-04 21:57:47 -06:00
|
|
|
implementation externalDependency.slf4jApi
|
2023-09-01 09:06:01 -05:00
|
|
|
runtimeOnly externalDependency.logbackClassic
|
2022-05-05 16:52:16 -05:00
|
|
|
compileOnly externalDependency.lombok
|
2025-03-07 15:24:14 +05:30
|
|
|
compileOnly externalDependency.hazelcast
|
2022-05-05 16:52:16 -05:00
|
|
|
implementation externalDependency.commonsCollections
|
2023-09-01 09:06:01 -05:00
|
|
|
api externalDependency.datastaxOssNativeProtocol
|
2023-11-14 19:00:22 -06:00
|
|
|
api(externalDependency.datastaxOssCore) {
|
|
|
|
exclude group: 'com.fasterxml.jackson.core'
|
|
|
|
}
|
2023-09-01 09:06:01 -05:00
|
|
|
api externalDependency.datastaxOssQueryBuilder
|
|
|
|
api externalDependency.elasticSearchRest
|
|
|
|
implementation externalDependency.javatuples
|
|
|
|
api externalDependency.javaxValidation
|
2022-10-05 16:53:38 -05:00
|
|
|
runtimeOnly externalDependency.jna
|
2023-09-01 09:06:01 -05:00
|
|
|
api externalDependency.kafkaClients
|
|
|
|
api externalDependency.ebean
|
2024-09-16 18:37:36 -05:00
|
|
|
annotationProcessor externalDependency.ebeanQueryBean
|
2023-09-02 19:25:44 -05:00
|
|
|
implementation externalDependency.ebeanDdl
|
2024-09-16 18:37:36 -05:00
|
|
|
implementation externalDependency.ebeanAgent
|
2023-09-01 09:06:01 -05:00
|
|
|
implementation externalDependency.opentelemetryAnnotations
|
2025-01-29 11:30:44 -06:00
|
|
|
implementation externalDependency.opentelemetrySdkTrace
|
2025-04-04 11:51:10 -03:00
|
|
|
implementation externalDependency.opentelemetrySdkMetrics
|
2023-09-01 09:06:01 -05:00
|
|
|
implementation externalDependency.resilience4j
|
2024-01-23 17:49:23 -06:00
|
|
|
// Newer Spring libraries require JDK17 classes, allow for JDK11
|
|
|
|
compileOnly externalDependency.springBootAutoconfigureJdk11
|
2023-09-01 09:06:01 -05:00
|
|
|
implementation(externalDependency.mixpanel) {
|
2023-05-19 16:39:30 -05:00
|
|
|
exclude group: 'org.json', module: 'json'
|
|
|
|
}
|
2021-06-03 13:24:33 -07:00
|
|
|
|
|
|
|
annotationProcessor externalDependency.lombok
|
|
|
|
|
2023-09-01 09:06:01 -05:00
|
|
|
testImplementation project(':test-models')
|
|
|
|
testImplementation project(path: ':test-models', configuration: 'testDataTemplate')
|
2025-06-04 13:54:45 -05:00
|
|
|
testFixturesApi project(':datahub-graphql-core')
|
2023-09-01 09:06:01 -05:00
|
|
|
testImplementation project(path: ':metadata-integration:java:datahub-client', configuration: 'shadow')
|
2024-03-23 06:15:36 -05:00
|
|
|
testImplementation project(':metadata-service:auth-impl')
|
2025-06-04 13:54:45 -05:00
|
|
|
testFixturesApi project(':metadata-service:configuration')
|
2025-01-14 17:28:34 -06:00
|
|
|
testImplementation project(':li-utils')
|
2023-09-01 09:06:01 -05:00
|
|
|
testImplementation externalDependency.testng
|
|
|
|
testImplementation externalDependency.h2
|
|
|
|
testImplementation externalDependency.mysqlConnector
|
|
|
|
testImplementation externalDependency.neo4jHarness
|
2023-12-15 13:28:33 -06:00
|
|
|
testImplementation (externalDependency.neo4jApocCore) {
|
|
|
|
exclude group: 'org.yaml', module: 'snakeyaml'
|
|
|
|
}
|
|
|
|
testImplementation (externalDependency.neo4jApocCommon) {
|
2023-11-10 17:58:38 +01:00
|
|
|
exclude group: 'org.yaml', module: 'snakeyaml'
|
|
|
|
}
|
2023-09-01 09:06:01 -05:00
|
|
|
testImplementation externalDependency.mockito
|
|
|
|
testImplementation externalDependency.mockitoInline
|
|
|
|
testImplementation externalDependency.iStackCommons
|
|
|
|
testImplementation externalDependency.resilience4j
|
|
|
|
testImplementation externalDependency.testContainers
|
|
|
|
testImplementation externalDependency.testContainersJunit
|
|
|
|
testImplementation externalDependency.testContainersElasticsearch
|
2023-09-21 13:01:55 -05:00
|
|
|
testImplementation externalDependency.testContainersOpenSearch
|
2023-09-01 09:06:01 -05:00
|
|
|
testImplementation externalDependency.testContainersCassandra
|
|
|
|
testImplementation externalDependency.lombok
|
2025-06-04 13:54:45 -05:00
|
|
|
testFixturesApi externalDependency.springBootTest
|
2023-09-01 09:06:01 -05:00
|
|
|
testImplementation spec.product.pegasus.restliServer
|
2024-09-16 18:37:36 -05:00
|
|
|
testImplementation externalDependency.ebeanTest
|
2025-02-24 12:13:20 -06:00
|
|
|
testImplementation externalDependency.opentelemetrySdk
|
2023-04-21 15:45:20 -05:00
|
|
|
// logback >=1.3 required due to `testcontainers` only
|
|
|
|
testImplementation 'ch.qos.logback:logback-classic:1.4.7'
|
2023-09-02 19:25:44 -05:00
|
|
|
testImplementation 'net.datafaker:datafaker:1.9.0'
|
2021-10-26 21:23:08 -07:00
|
|
|
|
2024-06-17 19:53:54 -05:00
|
|
|
testImplementation(testFixtures(project(":entity-registry")))
|
|
|
|
|
2021-10-26 21:23:08 -07:00
|
|
|
testAnnotationProcessor externalDependency.lombok
|
2024-12-28 01:49:15 +05:30
|
|
|
testImplementation project(':mock-entity-registry')
|
2021-12-10 20:07:55 +02:00
|
|
|
constraints {
|
2022-11-30 17:05:01 -06:00
|
|
|
implementation(externalDependency.log4jCore) {
|
2021-12-20 22:55:22 +08:00
|
|
|
because("previous versions are vulnerable to CVE-2021-45105")
|
2021-12-10 20:07:55 +02:00
|
|
|
}
|
2022-11-30 17:05:01 -06:00
|
|
|
implementation(externalDependency.log4jApi) {
|
2021-12-20 22:55:22 +08:00
|
|
|
because("previous versions are vulnerable to CVE-2021-45105")
|
2021-12-10 20:07:55 +02:00
|
|
|
}
|
2022-12-01 16:43:15 -06:00
|
|
|
implementation(externalDependency.commonsText) {
|
|
|
|
because("previous versions are vulnerable to CVE-2022-42889")
|
|
|
|
}
|
2023-02-20 00:02:05 -06:00
|
|
|
implementation(externalDependency.snakeYaml) {
|
|
|
|
because("previous versions are vulnerable to CVE-2022-25857")
|
|
|
|
}
|
|
|
|
implementation(externalDependency.woodstoxCore) {
|
|
|
|
because("previous versions are vulnerable to CVE-2022-40151-2")
|
|
|
|
}
|
|
|
|
implementation(externalDependency.jettison) {
|
|
|
|
because("previous versions are vulnerable")
|
|
|
|
}
|
2023-08-17 00:26:28 -05:00
|
|
|
implementation(externalDependency.snappy) {
|
|
|
|
because("previous versions are vulnerable to CVE-2023-34453 through CVE-2023-34455")
|
|
|
|
}
|
2023-11-14 19:00:22 -06:00
|
|
|
implementation(externalDependency.grpcProtobuf) {
|
|
|
|
because("CVE-2023-1428, CVE-2023-32731")
|
|
|
|
}
|
2021-12-10 20:07:55 +02:00
|
|
|
}
|
2021-06-03 13:24:33 -07:00
|
|
|
}
|
|
|
|
|
2021-11-15 23:49:15 +01:00
|
|
|
test {
|
2023-09-21 13:01:55 -05:00
|
|
|
doFirst {
|
|
|
|
// override, testng controlling parallelization
|
|
|
|
// increasing >1 will merely run all tests extra times
|
|
|
|
maxParallelForks = 1
|
|
|
|
}
|
|
|
|
useTestNG() {
|
|
|
|
suites 'src/test/resources/testng.xml'
|
|
|
|
}
|
2022-01-06 21:37:16 +05:30
|
|
|
testLogging.showStandardStreams = true
|
|
|
|
testLogging.exceptionFormat = 'full'
|
2024-11-23 05:54:43 -06:00
|
|
|
|
|
|
|
environment 'STRICT_URN_VALIDATION_ENABLED', 'true'
|
2021-11-15 23:49:15 +01:00
|
|
|
}
|
|
|
|
|
2024-09-16 18:37:36 -05:00
|
|
|
ebean {
|
|
|
|
debugLevel = 1 // 0 - 9
|
2021-06-03 13:24:33 -07:00
|
|
|
}
|
|
|
|
|
2024-09-16 18:37:36 -05:00
|
|
|
tasks.withType(Test) {
|
|
|
|
enableAssertions = false
|
2021-06-03 13:24:33 -07:00
|
|
|
}
|
2022-05-03 19:38:05 -05:00
|
|
|
|
2023-08-14 09:09:20 +05:30
|
|
|
clean {
|
2025-03-10 22:43:31 +05:30
|
|
|
//TODO: Is this really needed? dont see generated folder in projectDir. It is in build, but that doest need explicit clean
|
|
|
|
delete "$projectDir/generated"
|
|
|
|
}
|
|
|
|
|