forked from sofn/app-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
107 lines (93 loc) · 2.76 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
apply plugin: 'idea'
allprojects {
group = "com.appengine"
version = "0.1.RELEASE"
}
subprojects {
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
apply plugin: 'jacoco'
sourceCompatibility = 1.8
targetCompatibility = 1.8
buildscript {
repositories {
mavenLocal()
// maven { url "http://maven.oschina.net/content/groups/public/" }
mavenCentral()
maven { url "http://repo.spring.io/milestone" }
maven { url 'http://repo.spring.io/libs-release' }
}
}
repositories {
mavenLocal()
// maven { url "http://maven.oschina.net/content/groups/public/" }
mavenCentral()
maven { url "http://repo.spring.io/milestone" }
maven { url 'http://repo.spring.io/libs-release' }
}
//idea插件会默认下载source和doc文件
idea {
module {
downloadJavadoc = false
downloadSources = false
inheritOutputDirs = false
outputDir = file("$buildDir/classes/main/")
}
}
dependencies {
testCompile "junit:junit:4.11"
testCompile 'org.assertj:assertj-core:3.2.0'
testCompile "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
}
checkstyle {
configFile = file("$rootDir/configs/checkstyle/checkstyle.xml")
configProperties = ['projectDir': projectDir, 'rootDir': rootDir]
toolVersion = '6.10.1'
}
findbugs {
ignoreFailures = false
sourceSets = [sourceSets.main]
if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_7) >= 0) {
findbugs.toolVersion = '3.0.1'
} else {
findbugs.toolVersion = '2.0.3'
}
}
//覆盖率检查 自动绑定在task test上,报告路径:build/reports/tests
jacoco {
toolVersion = '0.7.5.201505241946'
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
}
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'http://your.repository.path/') {
authentication(userName: "username", password: "password")
}
pom.groupId = project.group
pom.artifactId = project.name
pom.version = project.version
}
}
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
//添加source jar
artifacts {
archives sourcesJar
}
}
//执行gradle wrapper自动生成gradlew脚本及配置
task wrapper(type: Wrapper) {
gradleVersion = '2.9'
}