@@ -385,17 +385,17 @@ dependencies {
385
385
}
386
386
387
387
def observationInputDir = file(' spring-kafka/src/main/java/org/springframework/kafka/support/micrometer' ). absolutePath
388
- def generatedDocsDir = file(" $b uildDir /docs/generated" ). absolutePath
388
+ def generatedDocsDir = file(' build /docs/generated' ). absolutePath
389
389
390
- task generateObservabilityDocs ( type : JavaExec ) {
390
+ tasks . register( ' generateObservabilityDocs ' , JavaExec ) {
391
391
mainClass = ' io.micrometer.docs.DocsGeneratorCommand'
392
392
inputs. dir(observationInputDir)
393
393
outputs. dir(generatedDocsDir)
394
394
classpath configurations. micrometerDocs
395
395
args observationInputDir, / .+/ , generatedDocsDir
396
396
}
397
397
398
- task filterMetricsDocsContent ( type : Copy ) {
398
+ tasks . register( ' filterMetricsDocsContent ' , Copy ) {
399
399
dependsOn generateObservabilityDocs
400
400
from generatedDocsDir
401
401
include ' _*.adoc'
@@ -404,7 +404,7 @@ task filterMetricsDocsContent(type: Copy) {
404
404
filter { line -> line. replaceAll(' org.springframework.kafka.support.micrometer.' , ' ' ). replaceAll(' ^Fully qualified n' , ' N' ) }
405
405
}
406
406
407
- task api ( type : Javadoc ) {
407
+ tasks . register( ' api ' , Javadoc ) {
408
408
group = ' Documentation'
409
409
description = ' Generates aggregated Javadoc API documentation.'
410
410
title = " ${ rootProject.description} ${ version} API"
@@ -430,7 +430,7 @@ task api(type: Javadoc) {
430
430
destinationDir = file(' build/api' )
431
431
}
432
432
433
- task docsZip ( type : Zip ) {
433
+ tasks . register( ' docsZip ' , Zip ) {
434
434
group = ' Distribution'
435
435
archiveClassifier = ' docs'
436
436
description = " Builds -${ archiveClassifier} archive containing api and reference " +
@@ -445,7 +445,8 @@ task docsZip(type: Zip) {
445
445
}
446
446
}
447
447
448
- task distZip (type : Zip , dependsOn : [docsZip]) {
448
+ tasks. register(' distZip' , Zip ) {
449
+ dependsOn ' docsZip'
449
450
group = ' Distribution'
450
451
archiveClassifier = ' dist'
451
452
description = " Builds -${ archiveClassifier} archive, containing all jars and docs, " +
@@ -483,12 +484,8 @@ task distZip(type: Zip, dependsOn: [docsZip]) {
483
484
484
485
}
485
486
486
- artifacts {
487
- archives distZip
488
- archives docsZip
489
- }
490
-
491
- task dist (dependsOn : assemble) {
487
+ tasks. register(' dist' ) {
488
+ dependsOn assemble
492
489
group = ' Distribution'
493
490
description = ' Builds -dist, -docs distribution archives.'
494
491
}
0 commit comments