-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
95 lines (67 loc) · 1.88 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
// SPDX-License-Identifier: MIT
allprojects{
apply from: "${rootProject.projectDir}/libraries.gradle"
/* turn off doclint java 8 */
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
repositories {
mavenLocal()
mavenCentral()
}
}
def doAutomateEclipseSetup = ['sechub-eclipse-other'];
subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
if (doAutomateEclipseSetup.contains(project.name)){
apply plugin: 'eclipse'
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
}
}
// apply plugin: "maven"
/* Setup UTF-8 for compile AND test compilation*/
[ compileJava, compileTestJava ]*.options*.encoding = 'UTF-8'
sourceCompatibility = '17'
targetCompatibility = '17'
dependencies{
testImplementation library.junit
testImplementation library.mockito_all
}
task sourcesJar(type: Jar, dependsOn:classes) {
archiveClassifier = 'sources'
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn:javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
}
/**
* Copies update site (must be build before in eclipse) to static part which
* is shown inside github pages
*/
task prepareDocs (type: Copy){
group 'SecHub'
def updateSiteLocation="${rootProject.projectDir}/sechub-eclipse-update-site/"
from ("$updateSiteLocation") {
exclude '.gitignore', '.project'
}
into "${rootProject.projectDir}/docs/update-site"
eachFile { println "copied:${it.name}" }
doFirst{
println "ATTENTION! Be aware that you must call signJars before! Otherwise update-site contains unsigned jars!"
}
}