fixes CVE-2021-45105 more log4shell remediation
In Gradle 4.x, the method getClassesDir() in SourceSetOutput has been deprecated in favor of a new method getClassesDirs().
Use reflection to invoke this method, if it is available, so that consumers using Gradle 4.x are spared the …