forked from h2oai/sparkling-water
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
174 lines (152 loc) · 5.12 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
//
// Sparkling Water build file.
// This is a multi-module build file.
//
// For multiproject setup we have to apply release plugin here (we share same release number cross all modules)
if (project.hasProperty("doRelease")) {
apply from: 'gradle/release.gradle'
}
// The build script settings to fetch plugins and put them on
// classpath
buildscript {
repositories {
mavenCentral()
jcenter()
maven { url "http://dl.bintray.com/releashaus/release" }
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2'
classpath 'org.github.mansur.scalastyle:gradle-scalastyle-plugin_2.10:0.4.1'
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.7.1'
classpath 'net.researchgate:gradle-release:2.0.2'
classpath 'com.adaptc.gradle:nexus-workflow:0.6'
classpath 'com.bmuschko:gradle-docker-plugin:2.6.5'
}
}
//
// Common configuration
//
ext {
// Published projects
publishedProjects = [
project(':sparkling-water-core'),
project(':sparkling-water-examples'),
project(':sparkling-water-repl')
]
integTestProjects = [
project(':sparkling-water-examples')
]
scalaProjects = [
project(':sparkling-water-core'),
project(':sparkling-water-examples'),
project(':sparkling-water-ml'),
project(':sparkling-water-assembly'),
project(':sparkling-water-repl')
]
pythonProjects = [
project(':sparkling-water-py')
]
}
//
// For all projects (this and all subprojects) specify common properties and tasks
//
configure(allprojects) { project ->
apply plugin: 'idea'
apply plugin: 'eclipse'
apply from: "$rootDir/gradle/artifacts.gradle"
// Version of main components
ext {
scalaVersion = '2.10.4'
scalaBinaryVersion = '2.10'
// h2oBuild property is defined in gradle.properties
h2oVersion = "$h2oMajorVersion.$h2oBuild"
sparkVersion = "$sparkVersion"
junitVersion = '4.11'
}
}
idea {
module {
inheritOutputDirs = false
outputDir = file('build/main')
testOutputDir = file('build/test')
}
}
//
// Common configuration for all subprojects
//
configure(subprojects) { project ->
// All project inherits the same versioning number
version = rootProject.version
repositories {
// Should be enabled only in development mode
if (h2oBuild == '99999') mavenLocal()
mavenCentral()
maven {
url "https://repository.cloudera.com/artifactory/cloudera-repos/"
}
// Public Sonatype repository
maven {
url "https://oss.sonatype.org/content/repositories/releases/"
}
// Snapshot repository of H2O builds
maven {
url "http://h2o-release.s3.amazonaws.com/h2o/master/$h2oBuild/maven/repo/"
}
}
if (project in scalaProjects) {
apply from: "$rootDir/gradle/scala.gradle"
}
if (project in pythonProjects) {
apply from: "$rootDir/gradle/python.gradle"
}
// All subprojects needs Spark support
apply from: "$rootDir/gradle/spark.gradle"
// Publish artifacts
if (project in publishedProjects) {
apply from: "$rootDir/gradle/publish.gradle"
}
if (project in integTestProjects) {
apply from: "$rootDir/gradle/itest.gradle"
}
ext {
// List of dependencies required for testing
// They will compose assembly passed to Spark cluster
testDependencies = ["ai.h2o:h2o-core",
"ai.h2o:h2o-algos",
"ai.h2o:h2o-app",
"ai.h2o:h2o-persist-hdfs",
"ai.h2o:h2o-genmodel",
"joda-time:joda-time",
"org.joda:joda-convert",
"org.javassist:javassist",
"gov.nist.math:jama",
"com.google.code.gson:gson",
"com.google.guava:guava",
"ai.h2o:reflections",
"ai.h2o:google-analytics-java",
"com.github.tony19:named-regexp",
"org.eclipse.jetty.aggregate:jetty-servlet",
"org.eclipse.jetty:jetty-server",
"org.eclipse.jetty:jetty-plus:8.1.17.v20150415"]
}
}
// This task is used by the Jenkins on test.h2o.ai.
//
// See ~jenkins/bin/buildsparklingwater.sh.
task buildSparklingWaterDist(type: Exec) {
def buildTimeMillis = System.currentTimeMillis();
def buildTimeIso8601 = new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC"))
def buildTimeLocal = new Date()
environment['BUILD_TIME_MILLIS'] = buildTimeMillis
environment['BUILD_TIME_ISO8601'] = buildTimeIso8601
environment['BUILD_TIME_LOCAL'] = buildTimeLocal
commandLine './make-dist.sh'
}
task dist(dependsOn: buildSparklingWaterDist)
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}
task clean(group: "Build tasks", description: "Clean up the project", type: Delete) {
delete file("build/")
delete file("h2ologs/")
}