@@ -23,6 +23,7 @@ plugins {
23
23
id ' org.antora' version ' 1.0.0'
24
24
id ' io.spring.antora.generate-antora-yml' version ' 0.0.1'
25
25
id ' com.github.spotbugs' version ' 6.0.19'
26
+ id ' io.freefair.aggregate-javadoc' version ' 8.6'
26
27
}
27
28
28
29
if (isCI) {
@@ -207,6 +208,11 @@ configure(javaProjects) { subproject ->
207
208
attribute(scopeAttribute, ' provided' )
208
209
}
209
210
}
211
+
212
+ [compileClasspath, testCompileClasspath, testRuntimeClasspath]. each {
213
+ it. extendsFrom(optional)
214
+ it. extendsFrom(provided)
215
+ }
210
216
}
211
217
212
218
components. java. with {
@@ -226,13 +232,6 @@ configure(javaProjects) { subproject ->
226
232
}
227
233
}
228
234
229
- [configurations. optional, configurations. provided]. each { scoped ->
230
- sourceSets. all {
231
- compileClasspath + = scoped
232
- runtimeClasspath + = scoped
233
- }
234
- }
235
-
236
235
java {
237
236
withJavadocJar()
238
237
withSourcesJar()
@@ -1102,28 +1101,34 @@ project('spring-integration-bom') {
1102
1101
}
1103
1102
}
1104
1103
1105
- tasks. register(' api' , Javadoc ) {
1106
- group = ' Documentation'
1107
- description = ' Generates aggregated Javadoc API documentation.'
1104
+ dependencies {
1105
+ javaProjects. each {
1106
+ javadoc it
1107
+ }
1108
+ }
1109
+
1110
+ javadoc {
1108
1111
title = " ${ rootProject.description} ${ version} API"
1109
1112
options {
1110
1113
encoding = ' UTF-8'
1111
1114
memberLevel = JavadocMemberLevel . PROTECTED
1112
1115
author = true
1113
- header = rootProject . description
1116
+ header = project . description
1114
1117
use = true
1115
1118
overview = ' src/api/overview.html'
1116
1119
splitIndex = true
1117
1120
links(project. ext. javadocLinks)
1118
1121
addBooleanOption(' Xdoclint:syntax' , true ) // only check syntax with doclint
1119
1122
}
1120
1123
1121
- source javaProjects. collect { project ->
1122
- project. sourceSets. main. allJava
1123
- }
1124
- destinationDir = new File (' build' , ' api' )
1124
+ destinationDir = file(' build/api' )
1125
1125
classpath = files(). from { files(javaProjects. collect { it. sourceSets. main. compileClasspath }) }
1126
+ }
1126
1127
1128
+ tasks. register(' api' ) {
1129
+ group = ' Documentation'
1130
+ description = ' Generates aggregated Javadoc API documentation.'
1131
+ dependsOn javadoc
1127
1132
}
1128
1133
1129
1134
dokkaHtmlMultiModule {
@@ -1180,7 +1185,7 @@ tasks.register('docsZip', Zip) {
1180
1185
include ' changelog.txt'
1181
1186
}
1182
1187
1183
- from(api ) {
1188
+ from(javadoc ) {
1184
1189
into ' api'
1185
1190
}
1186
1191
0 commit comments