(ByteBuddy loads the plugin using the specified class path).
Running ./gradlew clean my-app:build results in an error. The plugin could not be resolved.
Running ./gradlew clean build works. (probably because my-plugin is built before my-app).
What type of project is my-plugin? For example, is it a java project that applies the java plugin?
Is it possible you could provide a fully working example that reproduces the issue?
Yes, it is a java project. my-plugin must be built first. When also using a non-custom configuration, for example implementation, it works (so it is actually an execution dependency, and the plugin is built first). But with my custom configuration, this doesn’t happen automatically. Any ideas? @st_oehme
Thanks in advance.
I took a look at the bytebuddy plugin source and here’s the issue; The plugin adds a doLast to all AbstractCompile tasks. However, the plugin does not manipulate the task’s inputs or dependencies in any way. Therefore, those compile tasks do not know that your custom configuration is a dependency and Gradle cannot infer the dependency on the subproject. The implementation configuration works because the compile tasks are definitely configured correctly to identify the subproject task dependencies.
Ideally the bytebuddy plugin should be fixed.
Quick workaround: