we are having troubles switching to Gradle 3.0 due to some UnitTests in our project which make use of the task.setProject() method to switch the project of a task to a mocked one.
We create a mock project and mock the config container and stub some method calls to return certain resolved module versions or mocks of file trees. We then switch the project on a created task with this mock and check if our plugin task calls methods with the mocked file trees to make sure the code works as designed.
Since Gradle 3.0 Task.setProject() has been removed and now we try to find another way to test our code. Any suggestions on how we could get a functional task on a mocked project without recreating the complete project object?
Thanks in advance,