From 5bc7784c861daef519ad33c445d664afa8366c03 Mon Sep 17 00:00:00 2001 From: Mattias Reichel Date: Wed, 16 Oct 2024 19:52:41 +0200 Subject: [PATCH] fix: Change scope of dependencies in generated tests After this change this library needs to be referenced with `integrationTestImplementation testFixtures('org.grails.plugins:geb')` but now we are not leaking any test dependencies to downstream projects non-test configurations. --- build.gradle | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 37a3749..3259e69 100644 --- a/build.gradle +++ b/build.gradle @@ -34,13 +34,10 @@ dependencies { compileOnly "org.grails:grails-core:$grailsVersion" // Provided as this is a Grails plugin compileOnly "jakarta.servlet:jakarta.servlet-api:$servletApiVersion" // Provided by the servlet container - // These are used transitively by the tests generated by the 'create-functional-test' script - // If they are not included as api, the generated tests will not compile without adding the dependencies manually - api "org.gebish:geb-spock:$gebSpock" - api "org.grails:grails-testing-support:$testingSupportVersion" - api "org.grails:grails-datastore-gorm:$datastoreVersion" - testFixturesCompileOnly "jakarta.servlet:jakarta.servlet-api:$servletApiVersion" + testFixturesApi "org.gebish:geb-spock:$gebSpock" + testFixturesApi "org.grails:grails-testing-support:$testingSupportVersion" + testFixturesApi "org.grails:grails-datastore-gorm:$datastoreVersion" testFixturesApi "org.testcontainers:selenium:$testcontainersVersion" testFixturesApi "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion" testFixturesApi "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"