2024-01-23 17:49:23 -06:00
|
|
|
plugins {
|
|
|
|
|
id 'java-library'
|
|
|
|
|
id 'pegasus'
|
|
|
|
|
}
|
2019-08-31 20:51:14 -07:00
|
|
|
|
2020-06-11 10:21:51 -07:00
|
|
|
dependencies {
|
|
|
|
|
dataModel project(path: ':li-utils', configuration: 'dataTemplate')
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-21 07:49:00 +05:30
|
|
|
task copyMetadataModels(type: Sync) {
|
2020-06-11 10:21:51 -07:00
|
|
|
from("../../metadata-models/src/main/pegasus/")
|
|
|
|
|
into file("src/main/pegasus")
|
2019-08-31 20:51:14 -07:00
|
|
|
}
|
|
|
|
|
|
2020-06-11 10:21:51 -07:00
|
|
|
generateAvroSchema.dependsOn copyMetadataModels
|
2023-09-01 09:06:01 -05:00
|
|
|
validateSchemaAnnotation.dependsOn copyMetadataModels
|
|
|
|
|
mainTranslateSchemas.dependsOn copyMetadataModels
|
|
|
|
|
generateDataTemplate.dependsOn copyMetadataModels
|
|
|
|
|
mainCopySchemas.dependsOn copyMetadataModels
|
2020-06-11 10:21:51 -07:00
|
|
|
pegasus.main.generationModes = [PegasusGenerationMode.PEGASUS, PegasusGenerationMode.AVRO]
|
|
|
|
|
|
2025-03-21 07:49:00 +05:30
|
|
|
task renameNamespace(type: Sync, dependsOn: generateAvroSchema) {
|
2020-06-11 10:21:51 -07:00
|
|
|
from("src/mainGeneratedAvroSchema/avro")
|
2019-08-31 20:51:14 -07:00
|
|
|
into file("src/renamed/avro")
|
|
|
|
|
|
2025-03-10 22:43:31 +05:30
|
|
|
doLast {
|
|
|
|
|
project.exec {
|
|
|
|
|
commandLine 'bash', './rename-namespace.sh'
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-08-31 20:51:14 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
build.dependsOn renameNamespace
|
|
|
|
|
|
|
|
|
|
clean {
|
2025-03-10 22:43:31 +05:30
|
|
|
delete 'src/main/pegasus'
|
|
|
|
|
delete 'src/mainGeneratedAvroSchema/avro'
|
|
|
|
|
delete 'src/renamed/avro'
|
2024-12-10 10:31:35 +05:30
|
|
|
}
|