forked from h2oai/deepwater
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (100 loc) · 2.78 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
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
// This build script dependencies
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath 'net.researchgate:gradle-release:2.4.1'
classpath "be.insaneprogramming.gradle:animalsniffer-gradle-plugin:+"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.5'
}
}
//
// Configure project properties
//
ext {
buildOnlyBackendApi = project.hasProperty("buildOnlyBackendApi")
// List of all published projects
publishedProjects = [
project(':deepwater-backend-api'),
]
}
allprojects {
ext {
// Safe-flag to be sure that we are really performing release
isRelease = rootProject.hasProperty("doRelease")
}
// Technical task to list all artifacts
apply from: "$rootDir/gradle/artifacts.gradle"
// Global repositories to fetch this project artifacts
repositories {
mavenCentral()
}
}
//
// Apply support for releasing
//
if (isRelease) {
apply from: "$rootDir/gradle/release.gradle"
}
//
// Configure all submodules
//
subprojects {
// The projects share the same provider
group = rootProject.group
// Enable Java6 bytecode rewritting
if (project.hasProperty("doJava6Bytecode")) {
if (project.doJava6Bytecode == "true"
|| (project.doJava6Bytecode == "auto"
&& System.getProperty("user.name").equals("jenkins")
&& System.getenv("JAVA_6_HOME"))) {
apply from: "$rootDir/gradle/java6bytecode.gradle"
// Always do animal sniffing for java6
ext.doAnimalSniffer = "true"
}
}
// Publication
if (project in publishedProjects) {
// Support for artifact publication
apply from: "$rootDir/gradle/publish.gradle"
}
// This expects that all projects are Java projects
if (project.hasProperty("doAnimalSniffer") && project.doAnimalSniffer == "true") {
apply from: "$rootDir/gradle/animalSniffer.gradle"
}
}
//
// Top-level project build just an assembly of all required parts
//
// Support for FatJars
apply plugin: 'com.github.johnrengelman.shadow'
// Top-level project dependencies
dependencies {
compile project(":deepwater-backend-api")
if (!buildOnlyBackendApi) {
compile project('deepwater-mxnet')
compile project('deepwater-tensorflow')
}
// Test stuff
testCompile group: 'junit', name: 'junit', version: '4.11'
}
shadowJar {
archiveName = "deepwater-all.jar"
}
// We do not need jar for this project since we are generating FatJar
jar {
enabled = false
}
artifacts {
archives shadowJar
}
// TODO: upgrade me !
task wrapper(type: Wrapper) {
gradleVersion = '2.9'
}