forked from Moitcl/moqui-chile
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
117 lines (98 loc) · 4.28 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/*
* This software is in the public domain under CC0 1.0 Universal plus a
* Grant of Patent License.
*
* To the extent possible under law, the author(s) have dedicated all
* copyright and related and neighboring rights to this software to the
* public domain worldwide. This software is distributed without any
* warranty.
*
* You should have received a copy of the CC0 Public Domain Dedication
* along with this software (see the LICENSE.md file). If not, see
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
apply plugin: 'groovy'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
def componentNode = parseComponent(project)
version = componentNode.'@version'
def jarBaseName = componentNode.'@name'
def moquiDir = projectDir.parentFile.parentFile.parentFile
def frameworkDir = file(moquiDir.absolutePath + '/framework')
// to run use "gradle dependencyUpdates"
apply plugin: 'com.github.ben-manes.versions'
buildscript {
repositories { jcenter() }
dependencies { classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0' }
}
dependencyUpdates.resolutionStrategy = { componentSelection { rules -> rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier -> selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/ }
if (rejected) selection.reject('Release candidate')
} } }
repositories {
flatDir name: 'localLib', dirs: frameworkDir.absolutePath + '/lib'
flatDir name: 'librepo', dirs: projectDir.absolutePath + '/librepo'
jcenter()
}
dependencies {
compile project(':framework')
testCompile project(':framework').configurations.testCompile.allDependencies
// Transbank
compile 'com.github.transbankdevelopers:transbank-sdk-java:1.5.1'
// Conexión a web Services Banco Central
compile 'com.github.groovy-wslite:groovy-wslite:2.0.0-SNAPSHOT' // TODO: original version number was 2.0.0-SNAPSHOT
// DTE TODO: test
compile 'org.apache.james:apache-mime4j:0.6'
compile 'avalon-framework:avalon-framework-api:4.2.0'
//compile 'net.sf.barcode4j:barcode4j-fop-ext:2.0'
compile 'commons-io:commons-io:1.4'
compile 'commons-logging:commons-logging:1.1.1'
compile 'net.sf.offo:fop-hyph:2.0'
compile 'org.apache.httpcomponents:httpclient:4.0'
compile 'org.apache.httpcomponents:httpcore:4.0.1'
compile 'org.apache.httpcomponents:httpmime:4.0'
compile 'com.itextpdf:itextpdf:5.3.5'
//compile name: 'jargs'
compile 'org.jdom:jdom:1.1.3'
compile 'jaxb:jsr173_api:1.0'
compile ':not-yet-commons-ssl:0.3.11'
////compile 'not-yet-commons-ssl:not-yet-commons-ssl:0.3.13' (0.3.11 is not available at jcenter)
compile name: 'OpenLibsDte' // TODO: Genera error al compilar tests
compile ':serializer:2.7.0'
compile 'org.slf4j:slf4j-api:1.7.25'
compile ':slf4j-jdk14:1.7.25'
compile 'xalan:xalan:2.7.0'
//compile 'org.apache.xmlbeans:xmlbeans:2.4.0' (Both, 2.4.0 and 2.6.0 were included)
compile 'org.apache.xmlbeans:xmlbeans:2.6.0'
compile 'xml-apis:xml-apis-ext:1.3.04'
//compile 'org.apache.xmlgraphics:xmlgraphics-commons:1.3'
}
task cleanLib(type: Delete) { delete fileTree(dir: projectDir.absolutePath+'/lib', include: '*') }
clean.dependsOn cleanLib
task copyDependencies { doLast {
copy { from (configurations.runtime - project(':framework').configurations.runtime - project(':framework').jar.archivePath)
into file(projectDir.absolutePath + '/lib') }
} }
copyDependencies.dependsOn cleanLib
jar.dependsOn copyDependencies
check.dependsOn.remove(test)
jar {
destinationDir = file(projectDir.absolutePath + '/lib')
baseName = jarBaseName
}
test {
dependsOn cleanTest
include '**/*Tests.class'
include '**/*BasicFlow.class'
systemProperty 'moqui.runtime', moquiDir.absolutePath + '/runtime'
systemProperty 'moqui.conf', 'conf/MoquiDevConf.xml'
systemProperty 'moqui.init.static', 'true'
maxHeapSize = "512M"
testLogging.showStandardStreams = true
classpath += files(sourceSets.main.output.classesDirs)
// filter out classpath entries that don't exist (gradle adds a bunch of these), or ElasticSearch JarHell will blow up
classpath = classpath.filter { it.exists() }
beforeTest { descriptor ->
logger.lifecycle("Running test: ${descriptor}")
}
}