diff --git a/build.gradle b/build.gradle index 85a9980..c251b1f 100644 --- a/build.gradle +++ b/build.gradle @@ -143,6 +143,10 @@ subprojects { project-> } } + tasks.named('compileJava') { + inputs.files(tasks.named('processResources')) + } + groovydoc.classpath = configurations.documentation } diff --git a/component/build.gradle b/component/build.gradle index 9ff6b0b..32a3629 100644 --- a/component/build.gradle +++ b/component/build.gradle @@ -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" diff --git a/component/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/component/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 0000000..80f29c3 --- /dev/null +++ b/component/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -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", + "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", + "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": [] +} \ No newline at end of file diff --git a/json/build.gradle b/json/build.gradle index ca5aedc..61385f6 100644 --- a/json/build.gradle +++ b/json/build.gradle @@ -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") diff --git a/json/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/json/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 0000000..e8b869c --- /dev/null +++ b/json/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -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", + "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", + "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": [] +} \ No newline at end of file diff --git a/markup/build.gradle b/markup/build.gradle index 9ff6a04..78027c9 100644 --- a/markup/build.gradle +++ b/markup/build.gradle @@ -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" diff --git a/markup/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/markup/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 0000000..531cb42 --- /dev/null +++ b/markup/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,169 @@ +{ + "groups": [], + "properties": [ + { + "name": "grails.views.markup.allow-resource-expansion", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether resource expansion is allowed.", + "defaultValue": true + }, + { + "name": "grails.views.markup.base-template-class", + "type": "java.lang.Class", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "The template base class." + }, + { + "name": "grails.views.markup.cache", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether the cache templates.", + "defaultValue": false + }, + { + "name": "grails.views.markup.compile-static", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether to compile templates statically.", + "defaultValue": true + }, + { + "name": "grails.views.markup.enable-reloading", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether to enable reloading.", + "defaultValue": false + }, + { + "name": "grails.views.markup.encoding", + "type": "java.lang.String", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "The encoding to use.", + "defaultValue": "UTF-8" + }, + { + "name": "grails.views.markup.extension", + "type": "java.lang.String", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "The file extension of the templates." + }, + { + "name": "grails.views.markup.mime-types", + "type": "java.util.List", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration" + }, + { + "name": "grails.views.markup.package-imports", + "type": "java.lang.String[]", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "The default package imports.", + "defaultValue": [ + "groovy.transform" + ] + }, + { + "name": "grails.views.markup.package-name", + "type": "java.lang.String", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "The package name to use." + }, + { + "name": "grails.views.markup.pretty-print", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether to pretty print.", + "defaultValue": false + }, + { + "name": "grails.views.markup.static-imports", + "type": "java.lang.String[]", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "The default static imports.", + "defaultValue": [ + "org.springframework.http.HttpStatus", + "org.springframework.http.HttpMethod", + "grails.web.http.HttpHeaders" + ] + }, + { + "name": "grails.views.markup.template-path", + "type": "java.lang.String", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "The path to the templates." + }, + { + "name": "grails.views.markup.use-absolute-links", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether to use absolute links.", + "defaultValue": false + }, + { + "name": "grails.views.markup.declaration-encoding", + "type": "java.lang.String", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "The encoding used in the declaration header." + }, + { + "name": "grails.views.markup.expand-empty-elements", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether elements without body should be written in the short form or in an expanded form.", + "defaultValue": false + }, + { + "name": "grails.views.markup.use-double-quotes", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether attributes use double quotes instead of single quotes.", + "defaultValue": false + }, + { + "name": "grails.views.markup.new-line-string", + "type": "java.lang.String", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "The new line string." + }, + { + "name": "grails.views.markup.auto-escape", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether variables in the model which are assignable to should be automatically escaped.", + "defaultValue": false + }, + { + "name": "grails.views.markup.auto-indent", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether the template engine to render indents automatically.", + "defaultValue": false + }, + { + "name": "grails.views.markup.auto-indent-string", + "type": "java.lang.String", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "The indents are inserted after each call to newLine string." + }, + { + "name": "grails.views.markup.auto-new-line", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether the template engine to render new line automatically.", + "defaultValue": false + }, + { + "name": "grails.views.markup.cache-templates", + "type": "java.lang.Boolean", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration", + "description": "Whether to enable caching compiled templates, recommended to keep this flag to true in production.", + "defaultValue": false + }, + { + "name": "grails.views.markup.locale", + "type": "java.util.Locale", + "sourceType": "grails.plugin.markup.view.MarkupViewConfiguration" + } + ], + "hints": [] +} \ No newline at end of file