Permalink
Switch branches/tags
last_OK jenkins-tomk-hadoop-1 jenkins-tomas_jenkins-7 jenkins-tomas_jenkins-6 jenkins-tomas_jenkins-5 jenkins-tomas_jenkins-4 jenkins-tomas_jenkins-3 jenkins-tomas_jenkins-2 jenkins-tomas_jenkins-1 jenkins-sample-docs-3 jenkins-sample-docs-2 jenkins-sample-docs-1 jenkins-rel-wright-10 jenkins-rel-wright-9 jenkins-rel-wright-8 jenkins-rel-wright-7 jenkins-rel-wright-6 jenkins-rel-wright-5 jenkins-rel-wright-4 jenkins-rel-wright-3 jenkins-rel-wright-2 jenkins-rel-wright-1 jenkins-rel-wolpert-11 jenkins-rel-wolpert-10 jenkins-rel-wolpert-9 jenkins-rel-wolpert-8 jenkins-rel-wolpert-7 jenkins-rel-wolpert-6 jenkins-rel-wolpert-5 jenkins-rel-wolpert-4 jenkins-rel-wolpert-3 jenkins-rel-wolpert-2 jenkins-rel-wolpert-1 jenkins-rel-wheeler-12 jenkins-rel-wheeler-11 jenkins-rel-wheeler-10 jenkins-rel-wheeler-9 jenkins-rel-wheeler-8 jenkins-rel-wheeler-7 jenkins-rel-wheeler-6 jenkins-rel-wheeler-5 jenkins-rel-wheeler-4 jenkins-rel-wheeler-3 jenkins-rel-wheeler-2 jenkins-rel-wheeler-1 jenkins-rel-weierstrass-7 jenkins-rel-weierstrass-6 jenkins-rel-weierstrass-5 jenkins-rel-weierstrass-4 jenkins-rel-weierstrass-3 jenkins-rel-weierstrass-2 jenkins-rel-weierstrass-1 jenkins-rel-vapnik-1 jenkins-rel-vajda-4 jenkins-rel-vajda-3 jenkins-rel-vajda-2 jenkins-rel-vajda-1 jenkins-rel-ueno-12 jenkins-rel-ueno-11 jenkins-rel-ueno-10 jenkins-rel-ueno-9 jenkins-rel-ueno-8 jenkins-rel-ueno-7 jenkins-rel-ueno-6 jenkins-rel-ueno-5 jenkins-rel-ueno-4 jenkins-rel-ueno-3 jenkins-rel-ueno-2 jenkins-rel-ueno-1 jenkins-rel-tverberg-6 jenkins-rel-tverberg-5 jenkins-rel-tverberg-4 jenkins-rel-tverberg-3 jenkins-rel-tverberg-2 jenkins-rel-tverberg-1 jenkins-rel-tutte-2 jenkins-rel-tutte-1 jenkins-rel-turnbull-2 jenkins-rel-turnbull-1 jenkins-rel-turing-10 jenkins-rel-turing-9 jenkins-rel-turing-8 jenkins-rel-turing-7 jenkins-rel-turing-6 jenkins-rel-turing-5 jenkins-rel-turing-4 jenkins-rel-turing-3 jenkins-rel-turing-2 jenkins-rel-turing-1 jenkins-rel-turin-4 jenkins-rel-turin-3 jenkins-rel-turin-2 jenkins-rel-turin-1 jenkins-rel-turchin-11 jenkins-rel-turchin-10 jenkins-rel-turchin-9 jenkins-rel-turchin-8 jenkins-rel-turchin-7 jenkins-rel-turchin-6 jenkins-rel-turchin-5
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
385 lines (336 sloc) 12.1 KB
import org.apache.tools.ant.taskdefs.condition.Os
// The build script settings to fetch plugins and put them on
// classpath
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
mavenCentral()
jcenter()
}
//noinspection GroovyAssignabilityCheck
dependencies {
classpath 'org.ow2.asm:asm:5.1'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.3'
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.7.1'
classpath 'com.github.townsfolk:gradle-release:1.2'
classpath 'com.adaptc.gradle:nexus-workflow:0.6'
classpath 'org.testng:testng:6.8'
classpath 'be.insaneprogramming.gradle:animalsniffer-gradle-plugin:+'
classpath 'me.champeau.gradle:jmh-gradle-plugin:0.4.6'
classpath 'net.ltgt.gradle:gradle-apt-plugin:0.10'
// Note: Analyze unused/undefined dependencies for each module - good for debugging
// However, later it should be enabled by default
//classpath 'ca.cutterslade.gradle:gradle-dependency-analyze:1.1.0'
}
}
plugins {
id "java"
id "com.github.hierynomus.license" version "0.14.0"
}
//
// The top-level h2o-3 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 jar file that gets produced is empty and not usable
// for anything. Use the jar file produced by the :h2o-assemblies:main subproject.
//
apply from: 'gradle/java.gradle'
// 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'
}
// Print out time taken for each task so we find things that are slow.
apply from: 'gradle/timing.gradle'
//
// 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_2.10'),
project(':h2o-scala_2.11'),
project(':h2o-persist-gcs'),
project(':h2o-persist-hdfs'),
project(':h2o-persist-s3'),
project(':h2o-persist-http'),
project(':h2o-genmodel'),
project(':h2o-bindings'),
project(':h2o-avro-parser'),
project(':h2o-orc-parser'),
project(':h2o-parquet-parser'),
project(':h2o-jaas-pam'),
project(':h2o-automl'),
project(':h2o-genmodel-ext-xgboost'),
project(':h2o-ext-xgboost'),
project(':h2o-ext-krbstandalone'),
project(':h2o-ext-authsupport'),
project(':h2o-ext-jython-cfunc'),
]
javaProjects = [
project(':h2o-core'),
project(':h2o-algos'),
project(':h2o-web'),
project(':h2o-app'),
project(':h2o-persist-gcs'),
project(':h2o-persist-hdfs'),
project(':h2o-persist-s3'),
project(':h2o-persist-http'),
project(':h2o-test-integ'),
project(':h2o-test-accuracy'),
project(':h2o-genmodel'),
project(':h2o-bindings'),
project(':h2o-avro-parser'),
project(':h2o-orc-parser'),
project(':h2o-parquet-parser'),
project(':h2o-parquet-v17-compat'),
project(':h2o-jaas-pam'),
project(':h2o-automl'),
project(':h2o-genmodel-ext-xgboost'),
project(':h2o-ext-xgboost'),
project(':h2o-ext-krbstandalone'),
project(':h2o-ext-authsupport'),
project(':h2o-ext-jython-cfunc'),
]
scalaProjects = [
project(':h2o-scala_2.10'),
project(':h2o-scala_2.11'),
]
rProjects = [
project(':h2o-r')
]
pythonProjects = [
project(':h2o-py')
]
// The project which need to be run under CI only
testNeedsCiProject = [
// The S3 tests needs credentials which are provided by test environment.
// Because of restrictions of Amazon they cannot be stored in repository.
project(':h2o-persist-s3'),
]
// Projects with micro-benchmarks
ubenchProjects = [
project(':h2o-core'),
project(':h2o-algos')
]
// Apt required
// Only Java projects which needs to register core/rest/schema extensions
aptProjects = [
project(':h2o-core'),
project(':h2o-algos'),
project(':h2o-app'),
project(':h2o-automl')
]
//
// Versions of libraries shared cross all projects
// The version of protoc must match protobuf-java. If you don't depend on
// protobuf-java directly, you will be transitively depending on the
// protobuf-java version that grpc depends on.
//
junitVersion = '4.12'
jets3tVersion = '0.7.1'
awsJavaSdkVersion = '1.8.3'
//
// Optional H2O modules which can be included h2o.jar assembly
// They can be enabled by passing parameter "-Pwith{componentName}=true"
// For example, `-PwithVisDataServer=true -PvisDataServerVersion=3.14.27`
optionalComponents = [
// NAME | VERSION | IS ENABLED? | HAS GENMODEL PART ?
[name: "visDataServer", version : "1.0.0-SNAPSHOT", enabled: false, genmodel: false ],
[name: "xgboost", version: "$version", enabled: true, genmodel: true ],
[name: "jython-cfunc", version: "$version", enabled: true, genmodel: false],
]
//
// H2O's REST API version
//
h2oRESTApiVersion = '3'
getOsSpecificCommandLine = { List<GString> args ->
return Os.isFamily(Os.FAMILY_WINDOWS) ? ['cmd', '/c'] + args : ['/usr/bin/env'] + args
}
}
//
// For all projects (this and all subprojects) specify common properties and tasks
//
allprojects {
group = 'ai.h2o'
// By default inject debugging support
apply plugin: 'project-report'
apply from: "$rootDir/gradle/debug.gradle"
// Support different IDEs
apply plugin: 'idea'
idea.module.inheritOutputDirs = true
apply plugin: 'eclipse'
apply from: "$rootDir/gradle/artifacts.gradle"
ext {
isRelease = rootProject.hasProperty("doRelease")
isCi = (System.getProperty("user.name").equals("jenkins")
|| System.getenv("CI") != null
|| (rootProject.hasProperty("doCI") && rootProject.doCI == "true"))
}
}
// Compute applyFindbugsPlugin property
// Gradle by default interpret boolean properties setup in config file as strings.
// Hence we need here string toBoolean call
def applyFindbugsPlugin = rootProject.hasProperty("runFindbugs") ? rootProject.runFindbugs.toBoolean() : false
//
// Common configuration for all subprojects
//
subprojects {
// All project inherits the same versioning number
version = rootProject.version
repositories {
if (project.hasProperty("enableMavenLocal")) { // useful for development
mavenLocal()
}
mavenCentral()
jcenter()
maven {
url "https://repository.cloudera.com/artifactory/cloudera-repos/"
}
maven {
url "http://repo.hortonworks.com/content/repositories/releases/"
}
maven {
url "http://repo.hortonworks.com/content/repositories/jetty-hadoop/"
}
maven {
url "http://repository.mapr.com/maven/"
}
}
// 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"
}
// Note: this is deprecated and will be removed in the future
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"
// Include Findbugs only if the property is specified
if (project.hasProperty("doFindbugs") && project.doFindbugs == "true") {
apply from: "$rootDir/gradle/findbugs.gradle"
}
if (project.hasProperty("doCheckStyle") && project.doCheckStyle == "true") {
apply from: "$rootDir/gradle/checkstyle.gradle"
}
if (project.hasProperty("doAnimalSniffer") && project.doAnimalSniffer == "true") {
apply from: "$rootDir/gradle/animalSniffer.gradle"
}
if (testNeedsCiProject.contains(project)) {
logger.warn("The project $project needs CI for running tests! You can pass `-PdoCI=true` to force CI behaviour.")
project.testMultiNode.enabled = project.ext.isCi
}
// Analyze dependencies
//apply plugin: 'ca.cutterslade.analyze'
// Apt preprocessor
if (project in aptProjects) {
apply from: "$rootDir/gradle/apt.gradle"
}
}
// Configure Scala projects
if (project in scalaProjects) {
apply from: "$rootDir/gradle/scala.gradle"
apply from: "$rootDir/gradle/cp.gradle"
if (testNeedsCiProject.contains(project)) {
logger.warn("The project $project needs CI for running tests! You can pass `-PdoCI=true` to force CI behaviour.")
project.testMultiNode.enabled = project.ext.isCi
}
}
if (project in rProjects) {
apply from: "$rootDir/gradle/r.gradle"
}
if (project in pythonProjects) {
apply from: "$rootDir/gradle/r.gradle" // same plugins
}
if (project in ubenchProjects) {
if (project.hasProperty("doUBench") && project.doUBench == "true") {
apply from: "$rootDir/gradle/ubench.gradle"
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.10'
distributionType = Wrapper.DistributionType.ALL
}
//
// 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 buildTimeMillis = System.currentTimeMillis()
def buildTimeIso8601 = new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC"))
def buildTimeLocal = new Date()
def projectVersion = bv.getProjectVersion()
def branchName = bv.getBranch()
def buildNumber = bv.getBuildNumber()
def lastCommitHash = bv.getLastCommitHash()
environment['BUILD_TIME_MILLIS'] = buildTimeMillis
environment['BUILD_TIME_ISO8601'] = buildTimeIso8601
environment['BUILD_TIME_LOCAL'] = buildTimeLocal
environment['PROJECT_VERSION'] = projectVersion
environment['BRANCH_NAME'] = branchName
environment['BUILD_NUMBER'] = buildNumber
environment['LAST_COMMIT_HASH'] = lastCommitHash
commandLine './make-dist.sh'
}
task dist(dependsOn: buildH2oDevDist)
//
// Additional clean tasks to get squeaky clean.
//
task cleanH2oDistTmp(type: Delete) {
delete "$rootDir/h2o-dist/tmp"
}
task cleanTarget(type: Delete) {
delete "$rootDir/target"
}
clean.dependsOn cleanH2oDistTmp
clean.dependsOn cleanTarget
//
// Import project development profiles
//
apply from: "gradle/profiles.gradle"
//
// Import jacoco plugin if needed
//
if (project.hasProperty("jacocoCoverage")) {
apply from: "$rootDir/gradle/jacoco.gradle"
build.finalizedBy jacocoAgentLink
}