Skip to content

Commit

Permalink
fix: Change scope of dependencies in generated tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matrei committed Oct 16, 2024
1 parent d9ce199 commit 5bc7784
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5bc7784

Please sign in to comment.