Using isJava8Compatible() fails with java 9

Calling any of the “isJavaXCompatible” methods will fail on java 9. This can be traced to the commons-lang call used to do the comparison. It was fixed in commons-lang 3.4, but it looks like gradle 2.8 uses commons-lang 2.6.

Are you seeing the failure coming out of a plugin? We don’t use commons-lang for that comparison:

Yeah, it came from the nebula ospackage plugin.

Caused by: java.lang.NullPointerException
at org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast(
at org.apache.commons.lang3.SystemUtils$ Source)

Sorry, I hadn’t noticed the netflix part of the stacktrace before. But is it not correct that gradle plugins cannot have divergent dependency versions with those gradle pulls in?

Ah, thanks!

It looks like they’ve fixed that, but it hasn’t been released yet:

Yes, that’s one of the limitations with the way we load plugin classloaders. It seems like we barely use the commons-lang dependency, so we might be able to just remove it.