-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.gradle
76 lines (60 loc) · 1.64 KB
/
config.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
// Shared Gradle configuration for EndlessCode projects
apply plugin: 'java'
apply plugin: 'idea'
group = 'ru.endlesscode'
// Java version
sourceCompatibility = targetCompatibility = '1.8'
afterEvaluate {
// Set it again in case ForgeGradle or BukkitGradle resets it
sourceCompatibility = targetCompatibility = '1.8'
}
// Adding Java 1.8 tags support to javadoc
javadoc {
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
options.tags = ['apiNote:a:API Note:', 'implSpec:a:Implementation Requirements:', 'implNote:a:Implementation Note:']
}
// Creating javadoc jar
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
// Apply and configure Checkstyle
apply plugin: 'checkstyle'
checkstyle {
toolVersion = '8.1'
sourceSets = []
configFile = base.file('config/checkstyle.xml')
configProperties = [
'basedir': project.projectDir,
'severity': 'warning'
]
}
// Include LICENSE in final JAR
processResources {
from 'LICENSE.txt'
}
// Gradle version used for generating the Gradle wrapper
task wrapper(type: Wrapper) {
gradleVersion = base.gradleVersion
}
// JaCoCo settings
apply plugin: 'jacoco'
jacoco {
toolVersion = "0.7.9"
}
jacocoTestReport.reports {
xml.enabled true
csv.enabled false
html.enabled true
}
// Run JaCoCo after tests
check.dependsOn jacocoTestReport
// Common repositories and dependencies
repositories {
mavenCentral()
}
dependencies {
compileOnly group: 'org.jetbrains', name: 'annotations', version: '15.0'
testCompileOnly group: 'org.jetbrains', name: 'annotations', version: '15.0'
}