-
Notifications
You must be signed in to change notification settings - Fork 139
/
build.gradle
97 lines (80 loc) · 2.32 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
buildscript {
repositories {
mavenCentral()
maven { url 'http://repo.springsource.org/plugins-release' }
}
dependencies {
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
allprojects {
apply plugin: 'idea'
apply plugin: 'propdeps'
apply plugin: 'propdeps-idea'
apply plugin: 'propdeps-maven'
task idea(overwrite: true) {
dependsOn ideaModule
}
task cleanIdea(overwrite: true) {
dependsOn cleanIdeaModule
}
}
def leafProjects = subprojects.findAll { it.subprojects.empty }
configure(leafProjects) {
apply plugin: 'java'
apply plugin: 'findbugs'
ext.slf4j_version = '1.7.21'
ext.kotlin_version = '1.0.2'
ext.findbugs_version = '3.0.1u2'
ext.meta_projects_version = '1.1-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testCompile 'junit:junit:4.11'
testCompile 'org.hamcrest:hamcrest-all:1.3'
}
configure(tasks.withType(JavaCompile) + tasks.withType(Javadoc)) {
options.encoding = 'UTF-8'
}
configure(tasks.withType(JavaCompile)) {
options.compilerArgs << '-Xlint:all'
options.compilerArgs += ['-Xlint:-unchecked', '-Xlint:-rawtypes', '-Xlint:-cast']
}
findbugs {
toolVersion '3.0.1'
effort = 'max'
reportLevel = 'high'
excludeFilter = file("$projectDir/findbugs/config/excludeFilter.xml")
if (!excludeFilter.exists())
excludeFilter = null
}
apply from: "$rootProject.projectDir/methods.gradle"
setSourceCompatibility(project, 1.8)
}
def metaProjects = project(':jpsg').subprojects +
[':lib:template-processors', ':lib:impl-generator'].collect(this.&project)
metaProjects.each { p -> evaluationDependsOn(p.path) }
task buildMeta { dependsOn metaProjects*.build }
task cleanMeta { dependsOn metaProjects*.clean }
def mainProjects = leafProjects - metaProjects
configure(mainProjects) {
task buildMain { dependsOn build }
task cleanMain { dependsOn clean }
}
tasks.idea.dependsOn ideaProject
tasks.idea << {
copy {
from '.'
into '.idea/'
include '*.ipr'
rename { 'modules.xml' }
}
cleanIdeaProject.execute()
}
cleanIdea << {
delete '.idea/modules.xml'
}