Groovy memory leaks

Hi anyone,

I wanted to migrate to gradle 3.2.1, but I think I ran into a classloader leak, getting same Thread like shown in

I am using jdk8 and I create a new URLClassloader with project urls to load some things from the project and close it cleanly afterwards. With gradle 2.13 using groovy 2.4.4 this worked as a charme. With gradle 3.2.1 and groovy 2.4.7 I get this issue.

Can you please give me a hint how to workaround this or when you update to groovy-2.4.8, where it seems to be fixed?
Any help welcome

Gradle currently bundles the latest version of Groovy: 2.4.7. Groovy 2.4.8 hasn’t been released yet but we’ll make sure to integrate with the next major version of Gradle:

by the way: A workaround for me was to add a system property in the gradlew file (both windows and linux):

Don’t know if it solves the problem in all cases, but for my special case it seems to work