I uploaded a proposed solution to mentors, it is available at https://mentors.debian.net/package/gradle and dsc at https://mentors.debian.net/debian/pool/main/g/gradle/gradle_4.4.1-6.dsc
That one involves using the actual upstream patch for https://github.com/gradle/gradle/commit/028548460bd929fd034a552704798ad7f689493a Regards, Tiago