mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-25 10:30:04 +00:00
38 lines
1.1 KiB
Groovy
38 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"
|