/
build.gradle
85 lines (77 loc) · 3.66 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
/*
* 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'
version = '1.0.0'
def jarBaseName = 'moqui-orientdb'
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.13.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'
jcenter()
}
dependencies {
compile project(':framework')
// OrientDB
compile 'com.orientechnologies:orientdb-client:2.2.13' // Apache 2.0
compile 'com.orientechnologies:orientdb-core:2.2.13' // Apache 2.0
// orientdb-graphdb has a bunch of dependencies that conflict with other things, needed included below or elsewhere
compile module('com.orientechnologies:orientdb-graphdb:2.2.13') { // Apache 2.0
exclude group: 'com.tinkerpop.gremlin'
exclude group: 'com.orientechnologies'
exclude group: 'com.fasterxml.jackson.core'
exclude group: 'commons-beanutils' // includes commons-beanutils-core, commons-beanutils included elsewhere
}
compile('com.orientechnologies:orientdb-server:2.2.13') { exclude group: 'javax.mail' } // Apache 2.0
// this is a mess: blueprints-core depends on all sorts of things and some required dependencies have conflicts
compile module('com.tinkerpop.blueprints:blueprints-core:2.6.0')
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.5'
compile 'org.codehaus.jettison:jettison:1.3.8'
compile 'com.carrotsearch:hppc:0.7.2'
compile 'com.tinkerpop.gremlin:gremlin-java:2.6.0' // BSD
compile('com.tinkerpop.gremlin:gremlin-groovy:2.6.0') {
exclude group: 'org.codehaus.groovy'
exclude group: 'org.apache.ant'
exclude group: 'org.apache.ivy'
exclude group: 'org.fusesource.jansi'
exclude group: 'jline'
} // BSD
// runtime 'com.orientechnologies:orientdb-jdbc:2.2.0' // Apache 2.0
// orientdb-enterprise optional add-on for (commercial) enterprise features
// compile 'com.orientechnologies:orientdb-enterprise:2.2.0-beta' // Apache 2.0
}
// by default the Java plugin runs test on build, change to not do that (only run test if explicit task)
check.dependsOn.remove(test)
task cleanLib(type: Delete) { delete fileTree(dir: projectDir.absolutePath+'/lib', include: '*') }
clean.dependsOn cleanLib
jar {
destinationDir = file(projectDir.absolutePath + '/lib')
baseName = jarBaseName
}
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