-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
executable file
·74 lines (65 loc) · 2.25 KB
/
build.gradle
File metadata and controls
executable file
·74 lines (65 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
buildscript {
repositories {
jcenter()
maven {
url { 'https://dl.bintray.com/rjrudin/maven/' }
}
dependencies {
classpath 'com.marklogic:ml-gradle:3.6.0'
classpath 'gradle.plugin.com.marklogic:ml-data-hub:2.0.4'
classpath 'com.marklogic:ml-unit-test-client:0.9.1'
}
}
}
plugins {
id 'java'
id 'eclipse'
id 'idea'
// This plugin allows you to create different environments
// for your gradle deploy. Each environment is represented
// by a gradle-${env}.properties file
// See https://github.com/stevesaliman/gradle-properties-plugin
// specify the env on the command line with:
// gradle -PenvironmentName=x ...
id 'net.saliman.properties' version '1.4.6'
// This gradle plugin extends the ml-gradle plugin with
// commands that make the Data Hub Framework do its magic
id 'com.marklogic.ml-data-hub' version '2.0.4'
id 'com.marklogic.ml-gradle' version '3.6.0'
}
repositories {
jcenter()
maven {
url { 'https://dl.bintray.com/rjrudin/maven/'}
}
}
dependencies {
// this allows you to write custom java code that depends
// on the Data Hub Framework library
compile 'com.marklogic:marklogic-data-hub:2.0.4'
compile 'com.marklogic:marklogic-xcc:9.0.3'
mlRestApi 'com.marklogic:ml-unit-test:0.9.1'
}
task generateTDETemplateFromEntites(type: com.marklogic.gradle.task.es.GenerateModelArtifactsTask) {
def tmpEsDir = 'build/tmp/data/entity-services'
delete tmpEsDir
// need to copy into dedicated build dir as GenerateModelArtifactsTask
// expects to be able to create an entity for each dir and file in the
// plugins/entities/* directories
copy {
from 'plugins/entities'
into tmpEsDir
includeEmptyDirs false
include '*/Asset.entity.json'
eachFile { details ->
details.path = details.name // flatten copy
}
}
def appConfig = commandContext.appConfig
appConfig.modelsPath = tmpEsDir
appConfig.generateExtractionTemplate = true
appConfig.generateDatabaseProperties = false
appConfig.generateInstanceConverter = false
appConfig.generateSchema = false
appConfig.generateSearchOptions = false
}