mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-03 07:09:21 +00:00

Co-authored-by: Dexter Lee <dexter@acryl.io> Co-authored-by: Gabe Lyons <itsgabelyons@gmail.com> Co-authored-by: Shirshanka Das <shirshanka@apache.org>
39 lines
1.1 KiB
Groovy
39 lines
1.1 KiB
Groovy
plugins {
|
|
id "io.github.kobylynskyi.graphql.codegen" version "4.1.1"
|
|
}
|
|
apply plugin: 'java'
|
|
|
|
dependencies {
|
|
compile project(':gms:client')
|
|
compile project(':metadata-utils')
|
|
|
|
compile externalDependency.graphqlJava
|
|
compile externalDependency.antlr4Runtime
|
|
compile externalDependency.antlr4
|
|
compile externalDependency.guava
|
|
|
|
compileOnly externalDependency.lombok
|
|
annotationProcessor externalDependency.lombok
|
|
|
|
testCompile externalDependency.mockito
|
|
}
|
|
|
|
graphqlCodegen {
|
|
// For options: https://github.com/kobylynskyi/graphql-java-codegen/blob/master/docs/codegen-options.md
|
|
graphqlSchemaPaths = ["$projectDir/src/main/resources/gms.graphql".toString()]
|
|
outputDir = new File("$projectDir/src/mainGeneratedGraphQL/java")
|
|
packageName = "com.linkedin.datahub.graphql.generated"
|
|
generateApis = true
|
|
modelValidationAnnotation = "@javax.annotation.Nonnull"
|
|
customTypesMapping = [
|
|
Long: "Long",
|
|
]
|
|
}
|
|
|
|
tasks.withType(Checkstyle) {
|
|
exclude "**/generated/**"
|
|
}
|
|
|
|
compileJava.dependsOn 'graphqlCodegen'
|
|
sourceSets.main.java.srcDir "$projectDir/src/mainGeneratedGraphQL/java"
|