-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
88 lines (75 loc) · 2.51 KB
/
build.gradle
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/* use:
* Download all dependencies - \programs\gradle-4.4.1\bin\gradle getTestRuntimeLibs
* Download just the export dependencies - \programs\gradle-4.4.1\bin\gradle getExportLibs
*/
apply plugin: 'java'
configurations {
exportMxMustache { }
export { extendsFrom exportMxMustache }
compile { extendsFrom export }
}
compileJava.destinationDir = file("$rootDir/deployment/run/bin")
dependencies {
// public mendix runtime jars
compile name: 'com.mendix.public-api'
compile name: 'com.mendix.json'
compile name: 'com.mendix.logging-api'
compile name: 'com.mendix.m2ee-api'
compile name: 'javax.servlet-api.servlet'
// mx mustache
exportMxMustache 'org.parboiled:parboiled-java:1.1.7'
exportMxMustache 'org.apache.commons:commons-email:1.4'
exportMxMustache 'org.pegdown:pegdown:1.6.0'
testRuntime 'org.subethamail:subethasmtp-wiser:1.2'
exportMxMustache 'com.samskivert:jmustache:1.14-SNAPSHOT'
// unit test module
testRuntime 'junit:junit:4.12'
// Mendix SSO
testRuntime 'com.nimbusds:oauth2-oidc-sdk:6.14'
testRuntime 'org.apache.commons:commons-lang3:3.9'
testRuntime 'org.apache.commons:commons-text:1.8'
// object handling
// testRuntime 'commons-io:commons-io:2.3'
// testRuntime 'org.apache.commons:commons-lang3:3.6'
// testRuntime 'org.apache.httpcomponents:httpclient:4.4.1'
// testRuntime 'org.apache.httpcomponents:httpcore:4.4.1'
// compile 'com.fasterxml.jackson.core:jackson-databind:2.9.1'
// compile 'com.google.guava:guava:23.0'
}
repositories {
mavenCentral()
flatDir {
dirs '/c://Program Files/Mendix/7.23.8.58888/runtime/bundles', 'userlib-repo'
}
}
sourceSets {
main {
java {
srcDirs = ['javasource']
}
resources {
srcDirs = ['resources']
}
}
}
task getExportlibs(type: Copy) {
doFirst {
delete fileTree(dir: "userlib")
}
from configurations.exportMxMustache
into 'userlib/'
doLast {
files { file('userlib').listFiles() }.each { File file ->
println "file found: $file.name"
def keepFilename = 'userlib/' + file.name + '.MxMustache.RequiredLib'
ant.touch(file: keepFilename)
}
}
}
task getTestRuntimelibs(type: Copy) {
from configurations.compile
into 'userlib/'
}
task exportModule(type: Exec){
commandLine "\\Program Files\\Mendix\\7.23.8.58888\\modeler\\mxutil.exe", "create-module-package", "MxMustache.mpr", "MxMustache", "--package-dir=DIST"
}