@@ -385,17 +385,17 @@ dependencies {
385385}
386386
387387def 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
389389
390- task generateObservabilityDocs ( type : JavaExec ) {
390+ tasks . register( ' generateObservabilityDocs ' , JavaExec ) {
391391 mainClass = ' io.micrometer.docs.DocsGeneratorCommand'
392392 inputs. dir(observationInputDir)
393393 outputs. dir(generatedDocsDir)
394394 classpath configurations. micrometerDocs
395395 args observationInputDir, / .+/ , generatedDocsDir
396396}
397397
398- task filterMetricsDocsContent ( type : Copy ) {
398+ tasks . register( ' filterMetricsDocsContent ' , Copy ) {
399399 dependsOn generateObservabilityDocs
400400 from generatedDocsDir
401401 include ' _*.adoc'
@@ -404,7 +404,7 @@ task filterMetricsDocsContent(type: Copy) {
404404 filter { line -> line. replaceAll(' org.springframework.kafka.support.micrometer.' , ' ' ). replaceAll(' ^Fully qualified n' , ' N' ) }
405405}
406406
407- task api ( type : Javadoc ) {
407+ tasks . register( ' api ' , Javadoc ) {
408408 group = ' Documentation'
409409 description = ' Generates aggregated Javadoc API documentation.'
410410 title = " ${ rootProject.description} ${ version} API"
@@ -430,7 +430,7 @@ task api(type: Javadoc) {
430430 destinationDir = file(' build/api' )
431431}
432432
433- task docsZip ( type : Zip ) {
433+ tasks . register( ' docsZip ' , Zip ) {
434434 group = ' Distribution'
435435 archiveClassifier = ' docs'
436436 description = " Builds -${ archiveClassifier} archive containing api and reference " +
@@ -445,7 +445,8 @@ task docsZip(type: Zip) {
445445 }
446446}
447447
448- task distZip (type : Zip , dependsOn : [docsZip]) {
448+ tasks. register(' distZip' , Zip ) {
449+ dependsOn ' docsZip'
449450 group = ' Distribution'
450451 archiveClassifier = ' dist'
451452 description = " Builds -${ archiveClassifier} archive, containing all jars and docs, " +
@@ -483,12 +484,8 @@ task distZip(type: Zip, dependsOn: [docsZip]) {
483484
484485}
485486
486- artifacts {
487- archives distZip
488- archives docsZip
489- }
490-
491- task dist (dependsOn : assemble) {
487+ tasks. register(' dist' ) {
488+ dependsOn assemble
492489 group = ' Distribution'
493490 description = ' Builds -dist, -docs distribution archives.'
494491}
0 commit comments