Unable to resolve dependency when scanning in java11 on a build that is running in java8

Thanks Daniel. Followed Re: Move to Java 11 (Java 8 deprecated) and gradle sonarqube is working fine in jdk11.