This is an automated email from the ASF dual-hosted git repository.
jdaugherty pushed a commit to branch grails-views-merge
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to refs/heads/grails-views-merge by this
push:
new 066018da5b Pull forward fix from
a592ef258900406daef5648821cf716738231463
066018da5b is described below
commit 066018da5bb90fd0f7137ff658f77c1a8c47f5c6
Author: James Daugherty <[email protected]>
AuthorDate: Thu Apr 17 00:35:17 2025 -0400
Pull forward fix from a592ef258900406daef5648821cf716738231463
---
.../views/AbstractGroovyTemplatePlugin.groovy | 27 ++++++++----
.../src/integration-test/groovy/.gitkeep | 0
...GrailsTestExamplesGsonPluginGrailsPlugin.groovy | 50 +---------------------
3 files changed, 20 insertions(+), 57 deletions(-)
diff --git
a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplatePlugin.groovy
b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplatePlugin.groovy
index fcfabe9a99..bd5d4a008c 100644
---
a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplatePlugin.groovy
+++
b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplatePlugin.groovy
@@ -1,10 +1,6 @@
package org.grails.gradle.plugin.views
import grails.util.GrailsNameUtils
-import org.gradle.api.file.Directory
-import org.gradle.api.provider.Provider
-import org.grails.gradle.plugin.core.GrailsExtension
-import org.grails.gradle.plugin.util.SourceSets
import groovy.transform.CompileDynamic
import groovy.transform.CompileStatic
import org.apache.tools.ant.taskdefs.condition.Os
@@ -12,10 +8,15 @@ import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.file.ConfigurableFileCollection
+import org.gradle.api.file.Directory
import org.gradle.api.file.FileCollection
+import org.gradle.api.provider.Provider
import org.gradle.api.tasks.SourceSetOutput
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.bundling.Jar
+import org.grails.gradle.plugin.core.GrailsExtension
+import org.grails.gradle.plugin.core.IntegrationTestGradlePlugin
+import org.grails.gradle.plugin.util.SourceSets
/**
* Abstract implementation of a plugin that compiles views
@@ -83,11 +84,19 @@ class AbstractGroovyTemplatePlugin implements
Plugin<Project> {
tasks.named('resolveMainClassName').configure { Task task ->
task.dependsOn(templateCompileTask)
}
- tasks.named('compileIntegrationTestGroovy').configure { Task task ->
- task.dependsOn(templateCompileTask)
- }
- tasks.named('integrationTest').configure { Task task ->
- task.dependsOn(templateCompileTask)
+ if(project.plugins.hasPlugin(IntegrationTestGradlePlugin)) {
+
project.plugins.withType(IntegrationTestGradlePlugin).configureEach { plugin ->
+ if(tasks.names.contains('compileIntegrationTestGroovy')) {
+ tasks.named('compileIntegrationTestGroovy').configure {
Task task ->
+ task.dependsOn(templateCompileTask)
+ }
+ }
+ if(tasks.names.contains('integrationTest')) {
+ tasks.named('integrationTest').configure { Task task ->
+ task.dependsOn(templateCompileTask)
+ }
+ }
+ }
}
}
diff --git
a/grails-test-examples/gson-plugin/src/integration-test/groovy/.gitkeep
b/grails-test-examples/gson-plugin/src/integration-test/groovy/.gitkeep
deleted file mode 100644
index e69de29bb2..0000000000
diff --git
a/grails-test-examples/gson-plugin/src/main/groovy/functional/tests/plugin/GrailsTestExamplesGsonPluginGrailsPlugin.groovy
b/grails-test-examples/gson-plugin/src/main/groovy/functional/tests/plugin/GrailsTestExamplesGsonPluginGrailsPlugin.groovy
index 3042cf2dbe..4ed2884697 100644
---
a/grails-test-examples/gson-plugin/src/main/groovy/functional/tests/plugin/GrailsTestExamplesGsonPluginGrailsPlugin.groovy
+++
b/grails-test-examples/gson-plugin/src/main/groovy/functional/tests/plugin/GrailsTestExamplesGsonPluginGrailsPlugin.groovy
@@ -20,52 +20,6 @@ class GrailsTestExamplesGsonPluginGrailsPlugin extends
Plugin {
Brief summary/description of the plugin.
'''
def profiles = ['web']
-
- // URL to the plugin's documentation
- def documentation =
"http://grails.org/plugin/examples-views-functional-tests-plugin"
-
- // Extra (optional) plugin metadata
-
- // License: one of 'APACHE', 'GPL2', 'GPL3'
-// def license = "APACHE"
-
- // Details of company behind the plugin (if there is one)
-// def organization = [ name: "My Company", url:
"http://www.my-company.com/" ]
-
- // Any additional developers beyond the author specified above.
-// def developers = [ [ name: "Joe Bloggs", email: "[email protected]" ]]
-
- // Location of the plugin's issue tracker.
-// def issueManagement = [ system: "JIRA", url:
"http://jira.grails.org/browse/GPMYPLUGIN" ]
-
- // Online location of the plugin's browseable source code.
-// def scm = [ url: "http://svn.codehaus.org/grails-plugins/" ]
-
- Closure doWithSpring() { {->
- // TODO Implement runtime spring config (optional)
- }
- }
-
- void doWithDynamicMethods() {
- // TODO Implement registering dynamic methods to classes (optional)
- }
-
- void doWithApplicationContext() {
- // TODO Implement post initialization spring config (optional)
- }
-
- void onChange(Map<String, Object> event) {
- // TODO Implement code that is executed when any artefact that this
plugin is
- // watching is modified and reloaded. The event contains: event.source,
- // event.application, event.manager, event.ctx, and event.plugin.
- }
-
- void onConfigChange(Map<String, Object> event) {
- // TODO Implement code that is executed when the project configuration
changes.
- // The event is the same as for 'onChange'.
- }
-
- void onShutdown(Map<String, Object> event) {
- // TODO Implement code that is executed when the application shuts
down (optional)
- }
+ def documentation =
"https://grails.org/plugin/examples-functional-tests-plugin"
+ def license = "APACHE"
}