forked from harbby/sylph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
82 lines (70 loc) · 2.14 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
allprojects{
group 'ideal'
version '0.1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'checkstyle'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(ScalaCompile) {
options.encoding = 'UTF-8'
}
ext.deps = [
flink: '1.6.0',
jetty: "9.4.6.v20170531", //8.1.17.v20150415 "9.4.6.v20170531"
hadoop: "2.7.4",
spark: "2.3.1",
scala: '2.11.8',
joda_time:'2.9.3',
log4j12:'1.7.21',
guice:'4.2.0',
guava: '25.1-jre',
jackson: '2.9.5',
jersey: '2.27'
]
}
subprojects{
configurations {
testCompile.extendsFrom compileOnly
}
buildscript {
repositories {
mavenLocal()
maven { url 'https://harbby.github.io/.m2/repository/' }
}
dependencies {
classpath 'com.github.harbby:gradle-serviceloader:1.1.2'
}
}
repositories.add(repositories.mavenLocal())
if(System.getenv('TRAVIS_BUILD_DIR')!=null){
println("TRAVIS_BUILD..." + System.getenv('TRAVIS_BUILD_DIR'))
}else {
println("LOCAL_BUILD... ")
repositories.add(repositories.maven {url "http://maven.aliyun.com/nexus/content/groups/public/"})
}
repositories.add(repositories.mavenCentral())
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
checkstyle {
toolVersion '8.11'
showViolations true
}
task checkstyle(type: Checkstyle) {
configFile = file("${rootProject.projectDir}/src/checkstyle/facebook_checks.xml")
source 'src'
include '**/*.java'
exclude '**/gen/**', '**/test/**', '**/build/**', '**/module-info.java'
classpath = files()
}
assemble.dependsOn 'checkstyle'
/* 如果依赖版本冲突 则直接失败策略设置*/
configurations.all {
resolutionStrategy { failOnVersionConflict() }
}
// ./gradlew sylph-runners:sylph-runner-flink:dependencies
}