Acceptance test: sharing a plugin across a parallel subproject (GradleRunner)

(Ivan Šarić) #1

I was wondering if there was a better way for doing an acceptance test for a plugin.
Given the following folder structure:

└── gradle-project
├── acceptance-test
│ ├── build.gradle
│ ├── fixture-1
│ │ └── build.gradle
│ └── src
│ └── AcceptanceSpec.groovy
├── build.gradle
└── my-plugin
├── build.gradle
└── src
└── MyPlugin.groovy

The AcceptanceSpec creates a Gradle Runner instance and passes fixture-1 as a project dir. GradleRunner has a method withPluginClasspath(). How to share my-plugin using this method so that it can be tested with AcceptanceSpec?
Right now I am using a method described here (slightly adapted in this case) :

This exposes the plugins classpath correctly. I am wondering if there is already a gradle plugin that accomplishes this for the given project structure?

Any suggestions are welcome