-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
59 lines (46 loc) · 1.29 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
allprojects {
apply plugin: 'java'
apply plugin: uk.co.ractf.polaris.PolarisPlugin
apply plugin: 'jacoco'
group = 'uk.co.ractf'
version = '0.0.79'
repositories {
maven { url "https://repo1.maven.org/maven2/" }
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
options.deprecation = true
}
}
subprojects {
ext {
dropwizardVersion = '2.0.24'
}
test.useTestNG()
}
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
subprojects.each {
sourceSets it.sourceSets.main
}
reports {
xml.enabled true
xml.destination file("${buildDir}/reports/jacoco/report.xml")
html.enabled true
csv.enabled false
}
}
codeCoverageReport.dependsOn {
subprojects*.test
}
tasks.create(name: 'chmodGitHooks') {
Runtime.getRuntime().exec("chmod -R +x .git/hooks/");
}
task installGitHooks(type: Copy) {
from new File(rootProject.rootDir, 'scripts/pre-commit.py')
into { new File(rootProject.rootDir, '.git/hooks/') }
rename("pre-commit\\.py", "pre-commit")
}
chmodGitHooks.dependsOn installGitHooks
clean.dependsOn chmodGitHooks