From b7696494ef60843cef4d06ef5895dd657c6cf7ed Mon Sep 17 00:00:00 2001
From: Guillermo Calvo <guillermo@guillermo.dev>
Date: Fri, 27 Oct 2023 11:39:36 +0200
Subject: [PATCH] Add source set dependencies back to
 `integrationTestImplementation`

---
 .../gradle/plugin/core/IntegrationTestGradlePlugin.groovy     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main/groovy/org/grails/gradle/plugin/core/IntegrationTestGradlePlugin.groovy b/src/main/groovy/org/grails/gradle/plugin/core/IntegrationTestGradlePlugin.groovy
index 4648577d..9576b721 100644
--- a/src/main/groovy/org/grails/gradle/plugin/core/IntegrationTestGradlePlugin.groovy
+++ b/src/main/groovy/org/grails/gradle/plugin/core/IntegrationTestGradlePlugin.groovy
@@ -20,6 +20,7 @@ import groovy.transform.CompileDynamic
 import groovy.transform.CompileStatic
 import org.gradle.api.Plugin
 import org.gradle.api.Project
+import org.gradle.api.artifacts.dsl.DependencyHandler
 import org.gradle.api.tasks.SourceSet
 import org.gradle.api.tasks.SourceSetContainer
 import org.gradle.api.tasks.SourceSetOutput
@@ -61,6 +62,9 @@ class IntegrationTestGradlePlugin implements Plugin<Project> {
             final File resources = new File(project.projectDir, "grails-app/conf")
             integrationTest.resources.srcDir(resources)
 
+            final DependencyHandler dependencies = project.dependencies
+            dependencies.add("integrationTestImplementation", mainSourceSetOutput)
+            dependencies.add("integrationTestImplementation", testSourceSetOutput)
             project.configurations.named("integrationTestImplementation") {
                 it.extendsFrom(project.configurations.named("testImplementation").get())
             }