Skip to content

Commit 036317f

Browse files
committed
automates entity and input-flow creation (performance sample)
1 parent 63f3bfd commit 036317f

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

examples/performance-sample/build.gradle

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,37 @@ plugins {
88
// run DHF (Data Hub Framework) tasks from the
99
// command line
1010
id 'com.marklogic.ml-data-hub' version '2.0.0'
11-
}
11+
}
12+
13+
task createXmlEntity(type: com.marklogic.gradle.task.CreateEntityTask) {
14+
doFirst { project.ext.entityName = "input-xml" }
15+
}
16+
17+
task createJsonEntity(type: com.marklogic.gradle.task.CreateEntityTask) {
18+
doFirst { project.ext.entityName = "input-json" }
19+
}
20+
21+
task createInputXmlFlow(type: com.marklogic.gradle.task.CreateInputFlowTask) {
22+
doFirst {
23+
project.ext.entityName = "input-xml"
24+
project.ext.flowName = "raw-input-xml"
25+
project.ext.dataFormat = "xml"
26+
}
27+
}
28+
29+
task createInputJsonFlow(type: com.marklogic.gradle.task.CreateInputFlowTask) {
30+
doFirst {
31+
project.ext.entityName = "input-json"
32+
project.ext.flowName = "raw-input-json"
33+
project.ext.dataFormat = "json"
34+
}
35+
}
36+
37+
task createEntityInput() {
38+
dependsOn createXmlEntity
39+
dependsOn createJsonEntity
40+
dependsOn createInputXmlFlow
41+
dependsOn createInputJsonFlow
42+
finalizedBy mlLoadModules
43+
doLast { println "created XML and JSON entities and input flows" }
44+
}

0 commit comments

Comments
 (0)