| 
									
										
										
										
											2024-01-23 17:49:23 -06:00
										 |  |  | plugins { | 
					
						
							|  |  |  |   id 'java-library' | 
					
						
							|  |  |  |   id 'pegasus' | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							|  |  |  |   implementation 'com.github.java-json-tools:json-patch:1.13' // TODO: Replace with jakarta.json
 | 
					
						
							| 
									
										
										
										
											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' | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							|  |  |  |   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 | 
					
						
							| 
									
										
										
										
											2023-09-21 13:01:55 -05:00
										 |  |  |   api externalDependency.elasticSearchJava | 
					
						
							| 
									
										
										
										
											2023-09-01 09:06:01 -05:00
										 |  |  |   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 | 
					
						
							| 
									
										
										
										
											2021-06-03 13:24:33 -07:00
										 |  |  |   enhance externalDependency.ebeanAgent | 
					
						
							| 
									
										
										
										
											2023-09-02 19:25:44 -05:00
										 |  |  |   implementation externalDependency.ebeanDdl | 
					
						
							| 
									
										
										
										
											2023-09-01 09:06:01 -05:00
										 |  |  |   implementation externalDependency.opentelemetryAnnotations | 
					
						
							|  |  |  |   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') | 
					
						
							| 
									
										
										
										
											2023-01-31 18:44:37 -06:00
										 |  |  |   testImplementation 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') | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							|  |  |  |   testImplementation externalDependency.springBootTest | 
					
						
							|  |  |  |   testImplementation spec.product.pegasus.restliServer | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							| 
									
										
										
										
											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' | 
					
						
							| 
									
										
										
										
											2021-11-15 23:49:15 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-03 13:24:33 -07:00
										 |  |  | tasks.withType(Test) { | 
					
						
							| 
									
										
										
										
											2023-09-21 13:01:55 -05:00
										 |  |  |   enableAssertions = false | 
					
						
							| 
									
										
										
										
											2021-06-03 13:24:33 -07:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | project.compileJava { | 
					
						
							|  |  |  |   doLast { | 
					
						
							|  |  |  |     ant.taskdef(name: 'ebean', classname: 'io.ebean.enhance.ant.AntEnhanceTask', | 
					
						
							|  |  |  |         classpath: project.configurations.enhance.asPath) | 
					
						
							|  |  |  |     ant.ebean(classSource: "${project.buildDir}/classes/java/main", packages: 'com.linkedin.metadata.entity.ebean', | 
					
						
							|  |  |  |         transformArgs: 'debug=1') | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2022-05-03 19:38:05 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-14 09:09:20 +05:30
										 |  |  | clean { | 
					
						
							|  |  |  |   project.delete("$projectDir/generated") | 
					
						
							|  |  |  | } |