mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-11-03 20:27:50 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			66 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Groovy
		
	
	
	
	
	
			
		
		
	
	
			66 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Groovy
		
	
	
	
	
	
plugins {
 | 
						|
  id "io.github.kobylynskyi.graphql.codegen" version "4.1.1"
 | 
						|
}
 | 
						|
apply plugin: 'scala'
 | 
						|
apply from: './play.gradle'
 | 
						|
 | 
						|
 | 
						|
model {
 | 
						|
  // Must specify the dependency here as "stage" is added by rule based model.
 | 
						|
  tasks.myTar {
 | 
						|
    dependsOn stage
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
task myTar(type: Tar) {
 | 
						|
  extension = "tgz"
 | 
						|
  compression = Compression.GZIP
 | 
						|
 | 
						|
  from("${buildDir}/stage")
 | 
						|
 | 
						|
  into("bin") {
 | 
						|
    from("bin")
 | 
						|
  }
 | 
						|
 | 
						|
  into("conf") {
 | 
						|
    from("conf")
 | 
						|
    fileMode = 0600
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
artifacts {
 | 
						|
  archives myTar
 | 
						|
}
 | 
						|
 | 
						|
graphqlCodegen {
 | 
						|
  // For options: https://github.com/kobylynskyi/graphql-java-codegen/blob/master/docs/codegen-options.md
 | 
						|
  graphqlSchemaPaths = ["$projectDir/conf/datahub-frontend.graphql".toString()]
 | 
						|
  outputDir = new File("$projectDir/app/graphql")
 | 
						|
  packageName = "generated"
 | 
						|
  generateApis = true
 | 
						|
  modelValidationAnnotation = ""
 | 
						|
  customTypesMapping = [
 | 
						|
          Long: "Long",
 | 
						|
  ]
 | 
						|
}
 | 
						|
 | 
						|
tasks.withType(Checkstyle) {
 | 
						|
  exclude "**/generated/**"
 | 
						|
}
 | 
						|
 | 
						|
checkstyleMain.source = "app/"
 | 
						|
 | 
						|
 | 
						|
/*
 | 
						|
PLAY UPGRADE NOTE
 | 
						|
Generates the distribution jars under the expected names. The playFramework plugin only accepts certain name values
 | 
						|
for the resulting folders and files, so some changes were made to accommodate. Default distribution is main if these are excluded
 | 
						|
 */
 | 
						|
distributions {
 | 
						|
  create("datahub-frontend") {
 | 
						|
    distributionBaseName = project.ext.playBinaryBaseName
 | 
						|
  }
 | 
						|
  playBinary {
 | 
						|
    distributionBaseName = project.ext.playBinaryBaseName
 | 
						|
  }
 | 
						|
} |