| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  | plugins { | 
					
						
							| 
									
										
										
										
											2023-12-15 13:28:33 -06:00
										 |  |  |     id 'java' | 
					
						
							| 
									
										
										
										
											2025-04-02 11:51:10 +05:30
										 |  |  |     id "io.github.kobylynskyi.graphql.codegen" version "5.10.0" | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2023-12-15 13:28:33 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-12-03 06:57:43 +05:30
										 |  |  | apply from: '../gradle/coverage/java-coverage.gradle' | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | dependencies { | 
					
						
							| 
									
										
										
										
											2024-03-23 06:15:36 -05:00
										 |  |  |     implementation project(':metadata-service:restli-client-api') | 
					
						
							| 
									
										
										
										
											2023-09-01 09:06:01 -05:00
										 |  |  |     implementation project(':metadata-service:auth-impl') | 
					
						
							|  |  |  |     implementation project(':metadata-service:auth-config') | 
					
						
							|  |  |  |     implementation project(':metadata-service:configuration') | 
					
						
							|  |  |  |     implementation project(':metadata-service:services') | 
					
						
							|  |  |  |     implementation project(':metadata-io') | 
					
						
							|  |  |  |     implementation project(':metadata-utils') | 
					
						
							| 
									
										
										
										
											2024-01-22 11:46:04 -06:00
										 |  |  |     implementation project(':metadata-models') | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-02 19:35:10 -07:00
										 |  |  |     implementation externalDependency.graphqlJava | 
					
						
							|  |  |  |     implementation externalDependency.graphqlJavaScalars | 
					
						
							| 
									
										
										
										
											2023-09-01 09:06:01 -05:00
										 |  |  |     implementation externalDependency.antlr4Runtime | 
					
						
							|  |  |  |     implementation externalDependency.antlr4 | 
					
						
							|  |  |  |     implementation externalDependency.guava | 
					
						
							|  |  |  |     implementation externalDependency.opentelemetryAnnotations | 
					
						
							| 
									
										
										
										
											2021-06-03 13:24:33 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-04 21:57:47 -06:00
										 |  |  |     implementation externalDependency.slf4jApi | 
					
						
							| 
									
										
										
										
											2024-07-26 12:06:01 -07:00
										 |  |  |     implementation externalDependency.springContext | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  |     compileOnly externalDependency.lombok | 
					
						
							|  |  |  |     annotationProcessor externalDependency.lombok | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-01 09:06:01 -05:00
										 |  |  |     testImplementation externalDependency.mockito | 
					
						
							| 
									
										
										
										
											2023-09-21 13:01:55 -05:00
										 |  |  |     testImplementation externalDependency.testng | 
					
						
							| 
									
										
										
										
											2025-02-19 20:12:45 +05:30
										 |  |  |     testImplementation externalDependency.mockitoInline | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | graphqlCodegen { | 
					
						
							|  |  |  |     // For options: https://github.com/kobylynskyi/graphql-java-codegen/blob/master/docs/codegen-options.md
 | 
					
						
							| 
									
										
										
										
											2024-01-29 06:14:34 -08:00
										 |  |  |     graphqlSchemaPaths = fileTree(dir: "${projectDir}/src/main/resources", include: '**/*.graphql').collect { it.absolutePath } | 
					
						
							|  |  |  |     outputDir = new File("${projectDir}/src/mainGeneratedGraphQL/java") | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  |     packageName = "com.linkedin.datahub.graphql.generated" | 
					
						
							| 
									
										
										
										
											2024-01-16 17:44:21 +05:30
										 |  |  |     generateToString = true | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  |     generateApis = true | 
					
						
							| 
									
										
										
										
											2023-04-13 09:12:22 -07:00
										 |  |  |     generateParameterizedFieldsResolvers = false | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  |     modelValidationAnnotation = "@javax.annotation.Nonnull" | 
					
						
							| 
									
										
										
										
											2025-04-02 11:51:10 +05:30
										 |  |  |     addGeneratedAnnotation = false  // Skips timestamps in generated files which forces re-compile
 | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  |     customTypesMapping = [ | 
					
						
							| 
									
										
										
										
											2024-01-29 06:14:34 -08:00
										 |  |  |         Long: "Long", | 
					
						
							|  |  |  |         Float: "Float" | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  |     ] | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-02 00:30:05 +05:30
										 |  |  | clean { | 
					
						
							| 
									
										
										
										
											2022-03-09 15:31:16 -06:00
										 |  |  |     delete 'src/mainGeneratedGraphQL' | 
					
						
							| 
									
										
										
										
											2022-02-02 00:30:05 +05:30
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  | tasks.withType(Checkstyle) { | 
					
						
							|  |  |  |     exclude "**/generated/**" | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | compileJava.dependsOn 'graphqlCodegen' | 
					
						
							| 
									
										
										
										
											2025-04-16 16:55:51 -07:00
										 |  |  | build.dependsOn ':datahub-web-react:graphqlPrettierCheck' | 
					
						
							|  |  |  | spotlessApply.dependsOn ':datahub-web-react:graphqlPrettierWrite' | 
					
						
							| 
									
										
										
										
											2021-01-22 15:44:00 -08:00
										 |  |  | sourceSets.main.java.srcDir "$projectDir/src/mainGeneratedGraphQL/java" |