It certainly seems to be good practice to separate Gradle Plugin code into code and tests which do not depend on any Gradle API and Gradle Plugin specific code , see also https://github.com/gradle-guides/testing-gradle-plugins/tree/master/samples/code/url-verifier-plugin
Logging for the Gradle API dependent code is straight forward and well supported.
For me it’s not quite clear, how to do logging in the Gradle independent code, like for example in https://github.com/gradle-guides/testing-gradle-plugins/blob/master/samples/code/url-verifier-plugin/src/main/java/org/gradle/sample/http/DefaultHttpCaller.java without introducing a dependency to the Gradle API, also in terms of Logging Library to be used.
Or is this question academical? But then again, making basically domain layer code, dependent dependent on the Gradle API, seems to reduce the potential reusability.
Any suggestions, good practice, feedback?