Skip to content

Commit

Permalink
Fix Micrometer Docs Generation
Browse files Browse the repository at this point in the history
Do not reference the full project dir.
  • Loading branch information
garyrussell authored Jul 27, 2023
1 parent 270848c commit d8f1123
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,20 @@ task prepareAsciidocBuild(type: Sync) {
into "$buildDir/asciidoc"
}

def observationInputDir = project.rootDir.absolutePath
def observationInputDir = file("$buildDir/docs/microsources").absolutePath
def generatedDocsDir = file("$buildDir/docs/generated").absolutePath

task copyObservation(type: Copy) {
dependsOn prepareAsciidocBuild
from file('spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/micrometer').absolutePath
from file('spring-rabbit-stream/src/main/java/org/springframework/rabbit/stream/micrometer').absolutePath
include '*.java'
exclude 'package-info.java'
into observationInputDir
}

task generateObservabilityDocs(type: JavaExec) {
dependsOn copyObservation
mainClass = 'io.micrometer.docs.DocsGeneratorCommand'
inputs.dir(observationInputDir)
outputs.dir(generatedDocsDir)
Expand Down

0 comments on commit d8f1123

Please sign in to comment.