-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
102 lines (85 loc) · 2.39 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
buildscript {
ext.cubaVersion = rootProject.hasProperty('cubaVersion') ? rootProject['cubaVersion'] : '7.2-SNAPSHOT'
repositories {
mavenLocal()
if (System.getenv('HAULMONT_REPOSITORY_URL')) {
maven {
credentials {
username System.getenv('HAULMONT_REPOSITORY_USER')
password System.getenv('HAULMONT_REPOSITORY_PASSWORD')
}
url System.getenv('HAULMONT_REPOSITORY_URL')
}
}
maven {
url 'https://dl.bintray.com/cuba-platform/main'
}
}
dependencies {
classpath "com.haulmont.gradle:cuba-plugin:$cubaVersion"
classpath "com.haulmont.cuba:cuba-global:$cubaVersion"
}
}
def modulePrefix = 'cubazk'
def globalModule = project(":${modulePrefix}-global")
def coreModule = project(":${modulePrefix}-core")
def webModule = project(":${modulePrefix}-web")
apply(plugin: 'idea')
apply(plugin: 'cuba')
cuba {
artifact {
group = 'com.haulmont.addon.zookeeper'
version = '1.8'
isSnapshot = true
}
ide {
vcs = 'Git'
}
}
dependencies {
appComponent("com.haulmont.cuba:cuba-global:$cubaVersion")
}
configure([globalModule, coreModule, webModule]) {
apply(plugin: 'java')
apply(plugin: 'maven')
apply(plugin: 'idea')
apply(plugin: 'cuba')
dependencies {
testCompile('junit:junit:4.12')
}
task sourceJar(type: Jar) {
from file('src')
classifier = 'sources'
}
artifacts {
archives sourceJar
}
}
configure(globalModule) {
dependencies {
if (!JavaVersion.current().isJava8()) {
runtime('javax.xml.bind:jaxb-api:2.3.1')
runtime('org.glassfish.jaxb:jaxb-runtime:2.3.1')
}
compile('org.apache.curator:curator-framework:2.13.0')
compile('org.apache.curator:curator-recipes:2.13.0')
compile('org.apache.zookeeper:zookeeper:3.4.14')
compile('log4j:log4j:1.2.17')
}
jar {
manifest {
attributes('App-Component-Id': cuba.artifact.group)
attributes('App-Component-Version': cuba.artifact.version + (cuba.artifact.isSnapshot ? '-SNAPSHOT' : ''))
}
}
}
configure(coreModule) {
dependencies {
compile(globalModule)
}
}
configure(webModule) {
dependencies {
compile(globalModule)
}
}