Class DefaultModularityExtension
java.lang.Object
org.javamodularity.moduleplugin.extensions.DefaultModularityExtension
- All Implemented Interfaces:
ModularityExtension
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalling this method improves the ".classpath"-file created by Gradle's eclipse-plugin.voidmixedJavaRelease(int mainJavaRelease, int moduleInfoJavaRelease) Calling this method results in all Java classes being compiled to Java release 6-8 (as given by themainJavaReleaseparameter), with the exception ofmodule-info.javabeing compiled to Java release 9+ (as given by themoduleInfoJavaReleaseparameter).voidstandardJavaRelease(int mainJavaRelease) Calling this method results in all Java classes being compiled to Java release 9+ (as given by themainJavaReleaseparameter).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.javamodularity.moduleplugin.extensions.ModularityExtension
disableEffectiveArgumentsAdjustment, mixedJavaRelease, moduleVersion, patchModule
-
Constructor Details
-
DefaultModularityExtension
public DefaultModularityExtension(org.gradle.api.Project project)
-
-
Method Details
-
standardJavaRelease
public void standardJavaRelease(int mainJavaRelease) Description copied from interface:ModularityExtensionCalling this method results in all Java classes being compiled to Java release 9+ (as given by themainJavaReleaseparameter).See details about the
--releaseoption here.- Specified by:
standardJavaReleasein interfaceModularityExtension- Parameters:
mainJavaRelease- value for the--releaseoption ofcompileJavatask (allowed range: 9+)
-
mixedJavaRelease
public void mixedJavaRelease(int mainJavaRelease, int moduleInfoJavaRelease) Description copied from interface:ModularityExtensionCalling this method results in all Java classes being compiled to Java release 6-8 (as given by themainJavaReleaseparameter), with the exception ofmodule-info.javabeing compiled to Java release 9+ (as given by themoduleInfoJavaReleaseparameter).See details about the
--releaseoption here.- Specified by:
mixedJavaReleasein interfaceModularityExtension- Parameters:
mainJavaRelease- value for the--releaseoption ofcompileJavatask (allowed range: 6-8)moduleInfoJavaRelease- value for the--releaseoption ofcompileModuleInfoJavatask (allowed range: 9+)
-
optionContainer
- Specified by:
optionContainerin interfaceModularityExtension
-
improveEclipseClasspathFile
public void improveEclipseClasspathFile()Description copied from interface:ModularityExtensionCalling this method improves the ".classpath"-file created by Gradle's eclipse-plugin.This method configures the plugin such that the given content of a ".classpath"-file is modified in the following ways:
- Each "classpathentry" of kind = "con" with a path containing "JRE_CONTAINER" is moved to the module-path.
- Each "classpathentry" of kind = "lib" with a gradle_used_by_scope containing "main" gets an additional attribute module = "true".
- Each "classpathentry" with a gradle_used_by_scope of "test" gets an additional attribute test = "true".
For more information see Gradle's manual for the eclipse-plugin.
- Specified by:
improveEclipseClasspathFilein interfaceModularityExtension
-