Cannot apply spring-boot-gradle plugin in own plugin with gradle 3.0

Hi Andy,

Thanks for bringing this topic to our attention again. I had a look at the sample project provided by @seakayone. The issue the user is seeing is only exposed if you execute a test that leverages ProjectBuilder which in turn applies the plugin or uses any of its classes (compiled with Gradle 2.x). Applying the plugin to a regular build.gradle file executed with Gradle 3.x works as expected.

The reason for this behavior is grounded in how we load classes with ProjectBuilder. For the specific use case of testing plugins I’d recommend writing the test with TestKit instead which drives the build via the Tooling API.
We’d would like to continue the discussion on your concerns about Gradle internals leaking in your recent post.

@seakayone: We are eager to help you implement your test case with TestKit. I sent you a pull request that demonstrate the use of TestKit for your use case.

Your feedback is important to us and we understand your frustration. We are actively looking into options to make the same functionality available for ProjectBuilder as well. Please track the JIRA issue GRADLE-3558 for more information.



1 Like