forked from harbby/sylph
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
105 lines (91 loc) · 2.99 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
plugins {
id "com.github.hierynomus.license" version "0.14.0"
id "com.github.harbby.gradle.serviceloader" version "1.1.5"
}
allprojects{
group 'ideal'
version '0.3.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.1',
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.1',
guava: '25.1-jre',
jackson: '2.9.5',
jersey: '2.27'
]
}
subprojects{
if (project != rootProject) {
apply plugin: 'com.github.hierynomus.license'
}
configurations {
testCompile.extendsFrom compileOnly
}
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
license {
headerDefinitions { //see: http://code.mycila.com/license-maven-plugin/#supported-comment-types
javadoc_style {
firstLine = "/*"
endLine = " */"
beforeEachLine = " * "
afterEachLine = ""
firstLineDetectionPattern = "(\\s|\\t)*/\\*.*\$"
lastLineDetectionPattern = ".*\\*/(\\s|\\t)*\$"
allowBlankLines = false
padLines = false
//skipLine = "//"
isMultiline = true
}
}
header rootProject.file('src/license/LICENSE-HEADER.txt')
strictCheck true
excludes(["**/*.properties","**/*.sql"])
//include "**/*.java"
}
//assemble.dependsOn 'licenseMain','licenseTest'
//licenseMain.includes
//license.mapping('javascript', 'JAVADOC_STYLE')
}