-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
71 lines (56 loc) · 1.62 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
plugins {
id 'com.autonomousapps.dependency-analysis' version '0.46.0'
id 'io.codearte.nexus-staging' version "0.21.1"
}
allprojects {
apply plugin: 'base'
apply plugin: 'eclipse'
// Always download sources, to allow debugging
eclipse {
classpath {
downloadSources = true
}
}
repositories {
mavenCentral()
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'checkstyle'
checkstyle {
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
configProperties = [ 'checkstyle.config.dir' : rootProject.file('config/checkstyle') ]
toolVersion = '8.33'
}
task checkstyleAll{}
tasks.withType(Checkstyle).all { checkstyleTask -> checkstyleAll.dependsOn checkstyleTask }
check.dependsOn checkstyleAll
// Setup default test behavior, including failure logging
test {
useTestNG() {
useDefaultListeners = true
}
}
// Set Java 9 automatic module name to prevent future collisions
jar {
manifest {
attributes("Automatic-Module-Name": "${project.group}.${project.name}".replaceAll("-", "."))
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc
}
assemble.dependsOn sourcesJar
assemble.dependsOn javadocJar
tasks.withType(Jar).all {
from("${rootDir}"){
include 'LICENSE'
}
}
}