@@ -24,6 +24,7 @@ plugins {
24
24
id ' io.spring.antora.generate-antora-yml' version ' 0.0.1'
25
25
id ' com.github.spotbugs' version ' 6.0.19'
26
26
id ' com.google.protobuf' version ' 0.9.4' apply false
27
+ id ' io.freefair.aggregate-javadoc' version ' 8.6'
27
28
}
28
29
29
30
if (isCI) {
@@ -217,6 +218,11 @@ configure(javaProjects) { subproject ->
217
218
attribute(scopeAttribute, ' provided' )
218
219
}
219
220
}
221
+
222
+ [compileClasspath, testCompileClasspath, testRuntimeClasspath]. each {
223
+ it. extendsFrom(optional)
224
+ it. extendsFrom(provided)
225
+ }
220
226
}
221
227
222
228
components. java. with {
@@ -236,13 +242,6 @@ configure(javaProjects) { subproject ->
236
242
}
237
243
}
238
244
239
- [configurations. optional, configurations. provided]. each { scoped ->
240
- sourceSets. all {
241
- compileClasspath + = scoped
242
- runtimeClasspath + = scoped
243
- }
244
- }
245
-
246
245
java {
247
246
withJavadocJar()
248
247
withSourcesJar()
@@ -1113,28 +1112,34 @@ project('spring-integration-bom') {
1113
1112
}
1114
1113
}
1115
1114
1116
- tasks. register(' api' , Javadoc ) {
1117
- group = ' Documentation'
1118
- description = ' Generates aggregated Javadoc API documentation.'
1115
+ dependencies {
1116
+ javaProjects. each {
1117
+ javadoc it
1118
+ }
1119
+ }
1120
+
1121
+ javadoc {
1119
1122
title = " ${ rootProject.description} ${ version} API"
1120
1123
options {
1121
1124
encoding = ' UTF-8'
1122
1125
memberLevel = JavadocMemberLevel . PROTECTED
1123
1126
author = true
1124
- header = rootProject . description
1127
+ header = project . description
1125
1128
use = true
1126
1129
overview = ' src/api/overview.html'
1127
1130
splitIndex = true
1128
1131
links(project. ext. javadocLinks)
1129
1132
addBooleanOption(' Xdoclint:syntax' , true ) // only check syntax with doclint
1130
1133
}
1131
1134
1132
- source javaProjects. collect { project ->
1133
- project. sourceSets. main. allJava
1134
- }
1135
- destinationDir = new File (' build' , ' api' )
1135
+ destinationDir = file(' build/api' )
1136
1136
classpath = files(). from { files(javaProjects. collect { it. sourceSets. main. compileClasspath }) }
1137
+ }
1137
1138
1139
+ tasks. register(' api' ) {
1140
+ group = ' Documentation'
1141
+ description = ' Generates aggregated Javadoc API documentation.'
1142
+ dependsOn javadoc
1138
1143
}
1139
1144
1140
1145
dokkaHtmlMultiModule {
@@ -1191,7 +1196,7 @@ tasks.register('docsZip', Zip) {
1191
1196
include ' changelog.txt'
1192
1197
}
1193
1198
1194
- from(api ) {
1199
+ from(javadoc ) {
1195
1200
into ' api'
1196
1201
}
1197
1202
0 commit comments