Package org.gradle.api.jvm
Interface ModularitySpec
public interface ModularitySpec
Description of the modularity of a classpath.
A classpath is a list of JAR files, classes and resources folders passed to one of the JDK's commands like javac, java, or javadoc. Since Java 9, these commands offer two different approaches to handle such a classpath:
- A traditional classpath by using the --classpath parameter.
- A modular classpath (module path) using the --module-path parameter.
Wherever a classpath (a list of files and folders) is configured in Gradle, it can be accompanied by a ModularClasspathHandling object to describe how the entries of that list are to be passed to the --classpath and --module-path parameters.
- Since:
- 6.4
-
Method Summary
Modifier and TypeMethodDescriptionShould a --module-path be inferred by analysing JARs and class folders on the classpath?
-
Method Details
-
getInferModulePath
Should a --module-path be inferred by analysing JARs and class folders on the classpath?An entry is considered to be part of the module path if it meets one of the following conditions:
- It is a jar that contains a 'module-info.class'.
- It is a class folder that contains a 'module-info.class'.
- It is a jar with a MANIFEST that contains an 'Automatic-Module-Name' entry.
-