forked from rybalkinsd/atom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
111 lines (92 loc) · 3.1 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
plugins {
id 'org.springframework.boot' version '1.5.8.RELEASE'
id 'com.github.kt3k.coveralls' version '2.6.3'
}
springBoot {
mainClass = "ru.atom.chat.ChatApplication"
}
// constants declaration
ext {
jdkVersion = 1.8
junitVersion = "4.12"
log4jVersion = "2.7"
jetbrainsAnnotationVersion = "15.0"
okhttpVersion = "3.6.0"
gsonjVersion = "2.7"
postgresVersion = "9.4-1200-jdbc41"
jetbrainsAnnotationVersion = "15.0"
hibernateVersion = "5.1.10.Final"
jolVersion = "0.8"
}
allprojects {
group = "technoatom"
version = "1.0-SNAPSHOT"
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
repositories {
mavenCentral()
}
sourceCompatibility = jdkVersion
targetCompatibility = jdkVersion
}
subprojects {
if (!project.name.equals('bomberman/frontend'))
apply plugin: 'org.springframework.boot'
checkstyle {
ignoreFailures = false
toolVersion = '7.5'
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
}
tasks.withType(Checkstyle) {
reports {
xml.enabled false
html.destination "$rootProject.buildDir/report/${project.name}.html"
html.stylesheet resources.text.fromFile(rootProject.file('config/checkstyle/checkstyle-custom.xsl'))
}
}
}
// common libraries declaration
ext.libraries = [
spring_boot : [
"org.springframework.boot:spring-boot-starter-web",
"org.springframework.boot:spring-boot-starter-actuator",
],
spring_boot_test : "org.springframework.boot:spring-boot-starter-test",
spring_boot_websocket: "org.springframework.boot:spring-boot-starter-websocket",
spring_boot_jpa: "org.springframework.boot:spring-boot-starter-data-jpa",
junit: "junit:junit:$junitVersion",
log4j: [
"org.apache.logging.log4j:log4j-api:$log4jVersion",
"org.apache.logging.log4j:log4j-core:$log4jVersion"
],
jetbrainsAnnotations: "org.jetbrains:annotations:$jetbrainsAnnotationVersion",
okhttp: "com.squareup.okhttp3:okhttp:$okhttpVersion",
gson: "com.google.code.gson:gson:$gsonjVersion",
postgres: "org.postgresql:postgresql:$postgresVersion",
hibernate: "org.hibernate:hibernate-core:$hibernateVersion",
jol: "org.openjdk.jol:jol-core:$jolVersion",
jol_samples: "org.openjdk.jol:jol-samples:$jolVersion"
]
// code coverage settings
jacocoTestReport {
additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs)
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(subprojects.sourceSets.main.output)
executionData = files(subprojects.jacocoTestReport.executionData)
onlyIf = {
true
}
reports {
xml.enabled = true
html.enabled = true
}
doFirst {
executionData = files(executionData.findAll {
it.exists()
})
}
}
coveralls {
sourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs).files.absolutePath
}