-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-java.gradle
55 lines (44 loc) · 1.35 KB
/
build-java.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
/* ============================================================================
This file contains the configurations for
Java settings
============================================================================
Included from: "${rootProject.projectDir}/build.gradle"
============================================================================
*/
subprojects {
apply plugin: 'java'
/* Setup UTF-8 for compile AND test compilation*/
[ compileJava, compileTestJava ]*.options*.encoding = 'UTF-8'
/* Skip error javadoc for build the app */
javadoc.failOnError = true
sourceSets {
// Make the compileOnly dependencies available when compiling/running tests
test.compileClasspath += configurations.compileOnly
test.runtimeClasspath += configurations.compileOnly
}
/* Per default GRADLE stops the build if one single test fails. We want to have all tests executed. */
test {
ignoreFailures = false
}
/**
* Task to create source jars
*/
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
/**
* Task to create javadoc jars
*/
task javadocJar(type: Jar, dependsOn:javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
/**
* Define artifacts
*/
artifacts {
archives sourcesJar
archives javadocJar
}
}