-
Notifications
You must be signed in to change notification settings - Fork 61
/
build.gradle
65 lines (59 loc) · 1.85 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
plugins {
// The scalastyle plugin of smack-repl wants the root project to
// have a ideaProject task, so let's add one.
id 'idea'
id 'org.minidns.javadoc-conventions'
}
ext {
javadocAllDir = new File(buildDir, 'javadoc')
nonJavadocAllProjects = [
':minidns-integration-test',
':minidns-repl',
].collect{ project(it) }
javadocAllProjects = subprojects - nonJavadocAllProjects
}
evaluationDependsOnChildren()
task javadocAll(type: Javadoc) {
source javadocAllProjects.collect {project ->
project.sourceSets.main.allJava.findAll {
// Filter out symbolic links to avoid
// "warning: a package-info.java file has already been seen for package"
// javadoc warnings.
!java.nio.file.Files.isSymbolicLink(it.toPath())
}
}
destinationDir = javadocAllDir
// Might need a classpath
classpath = files(subprojects.collect {project ->
project.sourceSets.main.compileClasspath})
classpath += files(androidBootClasspath)
options {
linkSource = true
use = true
links = [
"https://docs.oracle.com/en/java/javase/${javaMajor}/docs/api/",
] as String[]
overview = "$projectDir/resources/javadoc-overview.html"
}
// Finally copy the javadoc doc-files from the subprojects, which
// are potentially generated, to the javadocAll directory. Note
// that we use a copy *method* and not a *task* because the inputs
// of copy tasks is determined within the configuration phase. And
// since some of the inputs are generated, they will not get
// picked up if we used a copy method. See also
// https://stackoverflow.com/a/40518516/194894
doLast {
copy {
javadocAllProjects.each {
from ("${it.projectDir}/src/javadoc") {
include '**/doc-files/*.*'
}
}
into javadocAllDir
}
}
}
task inttest {
description 'Verify correct functionality by running some integration tests.'
dependsOn project(':minidns-integration-test').tasks.run
}