You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by jd...@apache.org on 2025/06/11 22:31:12 UTC
(grails-core) branch issue-14804 created (now 685322bf74)
This is an automated email from the ASF dual-hosted git repository.
jdaugherty pushed a change to branch issue-14804
in repository https://gitbox.apache.org/repos/asf/grails-core.git
at 685322bf74 #14804 - fix convention defaults for gson / gml compilers
This branch includes the following new commits:
new 685322bf74 #14804 - fix convention defaults for gson / gml compilers
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(grails-core) 01/01: #14804 - fix convention defaults for gson / gml compilers
Posted by jd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jdaugherty pushed a commit to branch issue-14804
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 685322bf7477eec5e4d6dbfd978f989af452b1ee
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Wed Jun 11 18:31:00 2025 -0400
#14804 - fix convention defaults for gson / gml compilers
---
.../gradle/plugin/views/AbstractGroovyTemplateCompileTask.groovy | 8 ++++----
.../grails/gradle/plugin/views/json/GsonViewCompilerTask.groovy | 5 +----
.../gradle/plugin/views/markup/MarkupViewCompilerTask.groovy | 5 +----
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplateCompileTask.groovy b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplateCompileTask.groovy
index d76c6f53e2..a2a1df3a8b 100644
--- a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplateCompileTask.groovy
+++ b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplateCompileTask.groovy
@@ -72,14 +72,14 @@ abstract class AbstractGroovyTemplateCompileTask extends AbstractCompile {
private ExecOperations execOperations
@Inject
- AbstractGroovyTemplateCompileTask(ExecOperations execOperations, ObjectFactory objectFactory) {
+ AbstractGroovyTemplateCompileTask(ExecOperations execOperations, ObjectFactory objectFactory, String extensionDefault, String scriptBaseNameDefault, String compilerNameDefault) {
this.execOperations = execOperations
packageName = objectFactory.property(String).convention(project.name ?: project.projectDir.canonicalFile.name)
srcDir = objectFactory.directoryProperty()
compileOptions = new ViewCompileOptions(objectFactory)
- fileExtension = objectFactory.property(String)
- scriptBaseName = objectFactory.property(String)
- compilerName = objectFactory.property(String)
+ fileExtension = objectFactory.property(String).convention(extensionDefault)
+ scriptBaseName = objectFactory.property(String).convention(scriptBaseNameDefault)
+ compilerName = objectFactory.property(String).convention(compilerNameDefault)
grailsConfigurationPaths = objectFactory.fileCollection()
grailsConfigurationPaths.from(
//TODO: historically this only used .yml, should it explore all configuration paths?
diff --git a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/json/GsonViewCompilerTask.groovy b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/json/GsonViewCompilerTask.groovy
index 45d50a2b3a..9192b8a448 100644
--- a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/json/GsonViewCompilerTask.groovy
+++ b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/json/GsonViewCompilerTask.groovy
@@ -38,9 +38,6 @@ class GsonViewCompilerTask extends AbstractGroovyTemplateCompileTask {
@Inject
GsonViewCompilerTask(ExecOperations execOperations, ObjectFactory objectFactory) {
- super(execOperations, objectFactory)
- fileExtension.convention('gson')
- scriptBaseName.convention('grails.plugin.json.view.JsonViewTemplate')
- compilerName.convention('grails.plugin.json.view.JsonViewCompiler')
+ super(execOperations, objectFactory, 'gson', 'grails.plugin.json.view.JsonViewTemplate', 'grails.plugin.json.view.JsonViewCompiler')
}
}
diff --git a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/markup/MarkupViewCompilerTask.groovy b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/markup/MarkupViewCompilerTask.groovy
index 824bb5fee3..e9df0c625b 100644
--- a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/markup/MarkupViewCompilerTask.groovy
+++ b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/markup/MarkupViewCompilerTask.groovy
@@ -50,9 +50,6 @@ class MarkupViewCompilerTask extends AbstractGroovyTemplateCompileTask {
@Inject
MarkupViewCompilerTask(ExecOperations execOperations, ObjectFactory objectFactory) {
- super(execOperations, objectFactory)
- fileExtension.convention('gml')
- scriptBaseName.convention('grails.plugin.markup.view.MarkupViewTemplate')
- compilerName.convention('grails.plugin.markup.view.MarkupViewCompiler')
+ super(execOperations, objectFactory, 'gml', 'grails.plugin.markup.view.MarkupViewTemplate', 'grails.plugin.markup.view.MarkupViewCompiler')
}
}