forked from harbby/sylph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
134 lines (116 loc) · 3.22 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
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.5.0-SNAPSHOT' //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.7.2',
jetty : "9.4.6.v20170531", //8.1.17.v20150415 "9.4.6.v20170531"
hadoop : "2.7.4",
hbase : '1.1.2',
spark : "2.4.0",
scala : '2.11.8',
joda_time: '2.9.3',
log4j12 : '1.7.21',
guice : '4.2.1',
gadtry : '1.4.1-rc1',
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 {
mavenLocal()
//maven{ url 'http://maven.aliyun.com/nexus/content/groups/public'}
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
task clearOutDir(type: Delete) {
delete project.files('out')
}
clean.dependsOn clearOutDir
checkstyle {
toolVersion '8.12'
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')
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
//javadoc.failOnError = false
}
artifacts {
archives sourcesJar, javadocJar
}
javadoc {
options {
encoding "UTF-8"
charSet 'UTF-8'
author true
version true
links "https://harbby.github.io/project/sylph/en/docs/intro/"
title "sylph"
}
}
}