I have been trying to transition to JDK 11 in order to use the java.net.http package, but every time I try to build I get 'Error: java: package java.net.http does not exist'.

The package is present in the external libraries and recognized by the autocompletion, I use Gradle 4.10.2 and IDEA 2018.2.4.

Any help would be very appreciated.