How to import java module in Kotlin Gradle script

Viewed 217
2 Answers

You can't import packages in Java. You need to import a specific class:

import java.lang.module.ModuleDescriptor

Or import all classes from a package:

import java.lang.module.*

It is not really related to Gradle, it is specific to Java/Kotlin.

Upgrade your Project JDK to JDK 11. Import the Version class directly.

Related