Skip to content

Commit

Permalink
gradle docs plugin not reading the properties from application.groovy…
Browse files Browse the repository at this point in the history
… or application.yml- Fixes #9078
  • Loading branch information
graemerocher committed Jul 7, 2015
1 parent a59fd0a commit 98b46a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion grails-docs/src/main/groovy/grails/doc/DocPublisher.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ class DocPublisher {
}
def metaProps = DocPublisher.metaClass.properties
def props = engineProperties ?: new Properties()

if(propertiesFile?.exists()) {
if(propertiesFile.name.endsWith('.properties')) {
propertiesFile.withInputStream {
Expand All @@ -480,7 +481,10 @@ class DocPublisher {
def ymls = new Yaml().loadAll(input)
for(yml in ymls) {
if(yml instanceof Map) {
flattenKeys(props, (Map) yml,[], true)
def config = yml.grails?.doc
if(config instanceof Map) {
flattenKeys(props, (Map) config,[], true)
}
}
}
}
Expand All @@ -489,6 +493,7 @@ class DocPublisher {

}


for (MetaProperty mp in metaProps) {
if (mp.type == String) {
def value = props[mp.name]
Expand Down

0 comments on commit 98b46a0

Please sign in to comment.