forked from baratine/baratine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
163 lines (125 loc) · 3.26 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
apply plugin: 'application'
mainClassName = 'com.caucho.v5.cli.baratine.BaratineCommandLine'
allprojects {
group="io.baratine"
version=System.properties['version'] ?: "1.0.2-SNAPSHOT"
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral();
maven {
url "http://repo.gradle.org/gradle/libs-releases-local"
}
}
javadoc.options.links("http://docs.oracle.com/javase/8/docs/api/");
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
eclipse.project {
natures 'org.eclipse.buildship.core.gradleprojectnature'
}
eclipse.classpath {
defaultOutputDir = file('build/classes/main')
}
}
javadoc {
title = 'Baratine ' + version
options.links("http://docs.oracle.com/javase/8/docs/api/");
options.addStringOption('Xdoclint:none', '-quiet')
source = subprojects.sourceSets.main.allJava
}
task javadocIoBaratine(type: Javadoc) {
title = 'Baratine ' + version
options.links("http://docs.oracle.com/javase/8/docs/api/");
options.addStringOption('Xdoclint:none', '-quiet')
ArrayList mySources = new ArrayList();
subprojects.sourceSets.main.allJava.each{ sourceSet ->
mySources << sourceSet.filter{ file ->
return file.toString().contains('io/baratine');
}
}
source = mySources;
}
task javadocIoBaratineJar(type: Jar) {
classifier = 'javadoc'
from javadocIoBaratine
}
apply from: 'maven.gradle'
project(':core') {
dependencies {
compile project(':api')
}
}
project(':web') {
dependencies {
compile project(':api')
compile project(':core')
}
}
project(':kraken') {
dependencies {
compile project(':api')
compile project(':core')
compile project(':web')
}
}
project(':framework') {
apply plugin: 'application'
dependencies {
compile project(':api')
compile project(':core')
compile project(':web')
compile project(':kraken')
// compile project(':hessian')
}
mainClassName = 'com.caucho.v5.cli.baratine.BaratineCommandLine'
}
project(':test') {
dependencies {
testCompile project(':api')
testCompile project(':core')
testCompile project(':web')
testCompile project(':kraken')
testCompile project(':framework')
testCompile project(':plugins')
testCompile 'junit:junit:4.12'
testCompile 'org.hibernate:hibernate-validator:5.2.4.Final'
testCompile 'javax.el:javax.el-api:2.2.4'
}
}
configurations {
provided
compile.extendsFrom provided
}
distributions.each {
def copySpec = it.contents
copySpec.filesMatching('*.jar', {
// exclude all non-baratine dependencies
if (! it.file.parent.endsWith('build/libs')) {
it.exclude()
}
// only include baratine.jar for now
if (! it.name.equals('baratine-' + version + '.jar')) {
it.exclude()
}
})
}
dependencies {
compile project(':api')
compile project(':core')
compile project(':web')
// compile project(':hessian')
compile project(':framework')
compile project(':plugins')
}
jar {
dependsOn configurations.compile
from subprojects.jar.source exclude 'MANIFEST.MF'
manifest {
attributes "Main-Class" : mainClassName,
"Implementation-Version" : version
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.11'
}