forked from h2oai/h2o-3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
197 lines (170 loc) · 5.25 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
//
// The top-level h2o-dev project does not have any java pieces itself, but
// apply from the standard java.gradle so that 'gradle idea' generates IDE
// files with the right settings.
//
// The top-level h2o-dev.jar file that gets produced is empty and not usable
// for anything. Use the jar file produced by the h2o-assembly subproject.
//
apply from: 'gradle/java.gradle'
// For multiproject setup we have to apply release plugin here (we share same release number cross all modules)
apply from: 'gradle/release.gradle'
// Print out time taken for each task so we find things that are slow.
apply from: 'gradle/timing.gradle'
// The build script settings to fetch plugins and put them on
// classpath
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'eu.appsatori:gradle-fatjar-plugin:0.2'
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.7.1'
classpath 'com.github.townsfolk:gradle-release:1.2'
classpath 'de.undercouch:gradle-download-task:1.1'
classpath 'joda-time:joda-time:2.2'
}
}
//
// Common configuration
//
ext {
//
// All published projects - their artifacts are going to Maven central
publishedProjects = [
project(':h2o-core'),
project(':h2o-algos'),
project(':h2o-web'),
project(':h2o-app'),
project(':h2o-scala')
]
javaProjects = [
project(':h2o-core'),
project(':h2o-algos'),
project(':h2o-web'),
project(':h2o-app'),
project(':h2o-test-integ')
]
scalaProjects = [
project(':h2o-scala')
]
rProjects = [
project(':h2o-r')
]
pythonProjects = [
]
// Supported Hadoop versions used at compile time
// and assembled into resulting jar
hadoopVersions = [
/* CDH3 */ '0.20.2-cdh3u6',
/* CDH4.3 */ '2.0.0-cdh4.3.0',
/* CDH4.3 */ '2.0.0-cdh4.7.0',
/* CDH5.1 */ '2.3.0-cdh5.1.3',
/* CDH5.2 */ '2.5.0-cdh5.2.0',
/* HDP2.0.6 */ '2.2.0.2.0.6.0-102',
/* HDP2.1.3 */ '2.4.0.2.1.3.0-563',
/* HDP2.1.5 */ '2.4.0.2.1.5.0-695'
]
//
// Versions of libraries shared cross all projects
//
junitVersion = '4.11'
hadoopVersion = '2.5.0-cdh5.2.0'
jets3tVersion = '0.7.1'
awsJavaSdkVersion = '1.8.3'
}
//
// For all projects (this and all subprojects) specify common properties and tasks
//
allprojects {
group = 'ai.h2o'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply from: "$rootDir/gradle/artifacts.gradle"
}
//
// Common configuration for all subprojects
//
subprojects {
// All project inherits the same versioning number
version = rootProject.version
repositories {
mavenCentral()
// Cloudera dependencies
maven {
url "https://repository.cloudera.com/artifactory/cloudera-repos/"
}
// Hortonworks dependencies
maven {
url "http://repo.hortonworks.com/content/repositories/releases/"
}
// mavenLocal()
}
// Publish artifacts - we should filter subproject in future but now apply publisher plugin
// to all projects
if (project in publishedProjects) {
apply from: "$rootDir/gradle/publish.gradle"
}
apply from: "$rootDir/gradle/makeSupport.gradle"
//
// Early configuration of projects simplifies build resolution
//
// Configure Java projects
if (project in javaProjects) {
apply from: "$rootDir/gradle/java.gradle"
apply from: "$rootDir/gradle/cp.gradle"
}
// Configure Scala projects
if (project in scalaProjects) {
apply from: "$rootDir/gradle/scala.gradle"
apply from: "$rootDir/gradle/cp.gradle"
}
if (project in rProjects) {
apply from: "$rootDir/gradle/r.gradle"
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
//
// Setup global properties shared by all projects
//
ext {
// Collect all artifacts produced by all projects in this project - all "archives" artifacts
allArchives = subprojects.findAll().inject(
files(), { acc, pj ->
if (pj in publishedProjects)
acc + pj.configurations.archives.allArtifacts.getFiles()
else
acc
})
// Collect all test artifacts
allTestArchives = files() // filed lazily below
}
// After evaluation of all projects collect all artifacts produced by testArchives configuration
subprojects {
afterEvaluate( { pj ->
def testCnf = pj.configurations.findAll().find({ it.getName().equals("testArchives") })
if (testCnf != null) allTestArchives = allTestArchives + testCnf.allArtifacts.getFiles()
} )
}
// Include support for S3 syncing
apply from: "gradle/s3sync.gradle"
// This task is used by the Jenkins on test.h2o.ai.
//
// It creates a directory called 'target', copies everything to be released
// there, and everything in that directory gets uploaded to S3.
//
// See ~jenkins/bin/buildh2odev.sh.
task buildH2oDevDist(type: Exec) {
group='Dist'
H2OBuildVersion bv = new H2OBuildVersion(rootDir, version);
def projectVersion = bv.getProjectVersion()
environment['PROJECT_VERSION'] = projectVersion
commandLine './make-dist.sh'
}
//
// Import project development profiles
//
apply from: "gradle/profiles.gradle"