Skip to content

Commit

Permalink
Generate Spring Boot configuration metadata file
Browse files Browse the repository at this point in the history
Closes gh-42
  • Loading branch information
rainboyan committed Oct 27, 2024
1 parent a17088e commit 7a3b0ad
Show file tree
Hide file tree
Showing 7 changed files with 455 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ subprojects { project->
}
}

tasks.named('compileJava') {
inputs.files(tasks.named('processResources'))
}

groovydoc.classpath = configurations.documentation
}

Expand Down
3 changes: 3 additions & 0 deletions component/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ dependencies {
compileOnly "org.graceframework:grace-boot:$graceVersion"
api project(":views-core")

api "org.springframework.boot:spring-boot-autoconfigure"
annotationProcessor "org.springframework.boot:spring-boot-autoconfigure-processor"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
testImplementation "org.graceframework:grace-test-support:$graceVersion"

console "org.graceframework:grace-console"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"groups": [],
"properties": [
{
"name": "grails.views.component.allow-resource-expansion",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether resource expansion is allowed.",
"defaultValue": true
},
{
"name": "grails.views.component.base-template-class",
"type": "java.lang.Class<? extends groovy.text.markup.BaseTemplate>",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "The template base class."
},
{
"name": "grails.views.component.cache",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether the cache templates.",
"defaultValue": false
},
{
"name": "grails.views.component.compile-static",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether to compile templates statically.",
"defaultValue": true
},
{
"name": "grails.views.component.enable-reloading",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether to enable reloading.",
"defaultValue": false
},
{
"name": "grails.views.component.encoding",
"type": "java.lang.String",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "The encoding to use.",
"defaultValue": "UTF-8"
},
{
"name": "grails.views.component.extension",
"type": "java.lang.String",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "The file extension of the templates."
},
{
"name": "grails.views.component.mime-types",
"type": "java.util.List<java.lang.String>",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration"
},
{
"name": "grails.views.component.package-imports",
"type": "java.lang.String[]",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "The default package imports.",
"defaultValue": [
"groovy.transform"
]
},
{
"name": "grails.views.component.package-name",
"type": "java.lang.String",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "The package name to use."
},
{
"name": "grails.views.component.pretty-print",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether to pretty print.",
"defaultValue": false
},
{
"name": "grails.views.component.static-imports",
"type": "java.lang.String[]",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "The default static imports.",
"defaultValue": [
"org.springframework.http.HttpStatus",
"org.springframework.http.HttpMethod",
"grails.web.http.HttpHeaders"
]
},
{
"name": "grails.views.component.template-path",
"type": "java.lang.String",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "The path to the templates."
},
{
"name": "grails.views.component.use-absolute-links",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether to use absolute links.",
"defaultValue": false
},
{
"name": "grails.views.component.declaration-encoding",
"type": "java.lang.String",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "The encoding used in the declaration header."
},
{
"name": "grails.views.component.expand-empty-elements",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether elements without body should be written in the short form or in an expanded form.",
"defaultValue": false
},
{
"name": "grails.views.component.use-double-quotes",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether attributes use double quotes instead of single quotes.",
"defaultValue": false
},
{
"name": "grails.views.component.new-line-string",
"type": "java.lang.String",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "The new line string."
},
{
"name": "grails.views.component.auto-escape",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether variables in the model which are assignable to should be automatically escaped.",
"defaultValue": false
},
{
"name": "grails.views.component.auto-indent",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether you want the template engine to render indents automatically.",
"defaultValue": false
},
{
"name": "grails.views.component.auto-indent-string",
"type": "java.lang.String",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "The indents are inserted after each call to newLine string."
},
{
"name": "grails.views.component.auto-new-line",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether you want the template engine to render new line automatically.",
"defaultValue": false
},
{
"name": "grails.views.component.cache-templates",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration",
"description": "Whether to enable caching compiled templates, recommended to keep this flag to true in production.",
"defaultValue": false
},
{
"name": "grails.views.component.locale",
"type": "java.util.Locale",
"sourceType": "grails.plugin.component.view.ComponentViewConfiguration"
}
],
"hints": []
}
3 changes: 3 additions & 0 deletions json/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ dependencies {
compileOnly "org.graceframework:grace-boot:$graceVersion"
api project(":views-core")

api "org.springframework.boot:spring-boot-autoconfigure"
annotationProcessor "org.springframework.boot:spring-boot-autoconfigure-processor"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
api "org.graceframework:grace-datastore-gorm:$gormVersion"
testImplementation "org.graceframework:grace-test-support:$graceVersion"
testImplementation project(":views-json-testing-support")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"groups": [],
"properties": [
{
"name": "grails.views.json.allow-resource-expansion",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "Whether resource expansion is allowed.",
"defaultValue": true
},
{
"name": "grails.views.json.base-template-class",
"type": "java.lang.Class<? extends groovy.text.markup.BaseTemplate>",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "The template base class."
},
{
"name": "grails.views.json.cache",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "Whether the cache templates.",
"defaultValue": false
},
{
"name": "grails.views.json.compile-static",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "Whether to compile templates statically.",
"defaultValue": true
},
{
"name": "grails.views.json.enable-reloading",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "Whether to enable reloading.",
"defaultValue": false
},
{
"name": "grails.views.json.encoding",
"type": "java.lang.String",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "The encoding to use.",
"defaultValue": "UTF-8"
},
{
"name": "grails.views.json.extension",
"type": "java.lang.String",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "The file extension of the templates."
},
{
"name": "grails.views.json.mime-types",
"type": "java.util.List<java.lang.String>",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration"
},
{
"name": "grails.views.json.package-imports",
"type": "java.lang.String[]",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "The default package imports.",
"defaultValue": [
"groovy.transform"
]
},
{
"name": "grails.views.json.package-name",
"type": "java.lang.String",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "The package name to use."
},
{
"name": "grails.views.json.pretty-print",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "Whether to pretty print.",
"defaultValue": false
},
{
"name": "grails.views.json.static-imports",
"type": "java.lang.String[]",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "The default static imports.",
"defaultValue": [
"org.springframework.http.HttpStatus",
"org.springframework.http.HttpMethod",
"grails.web.http.HttpHeaders"
]
},
{
"name": "grails.views.json.template-path",
"type": "java.lang.String",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "The path to the templates."
},
{
"name": "grails.views.json.use-absolute-links",
"type": "java.lang.Boolean",
"sourceType": "grails.plugin.json.view.JsonViewConfiguration",
"description": "Whether to use absolute links.",
"defaultValue": false
}
],
"hints": []
}
3 changes: 3 additions & 0 deletions markup/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ dependencies {
implementation "org.springframework.boot:spring-boot-autoconfigure"
api project(":views-core")

api "org.springframework.boot:spring-boot-autoconfigure"
annotationProcessor "org.springframework.boot:spring-boot-autoconfigure-processor"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
testImplementation "org.graceframework:grace-test-support:$graceVersion"

console "org.graceframework:grace-console"
Expand Down
Loading

0 comments on commit 7a3b0ad

Please sign in to comment.