Interface JavaPlugin
- All Superinterfaces:
build.spin.Extension, build.spin.Plugin
- All Known Subinterfaces:
JavaCompilerPlugin
- All Known Implementing Classes:
AbstractJavaPlugin, Java25CompilerPlugin, Java8CompilerPlugin
public interface JavaPlugin
extends build.spin.Plugin
A
Plugin defining Tasks for a Java-based Projects.- Since:
- Jun-2020
- Author:
- brian.oliver
-
Nested Class Summary
Nested classes/interfaces inherited from interface build.spin.Plugin
build.spin.Plugin.Comparable<P>, build.spin.Plugin.MetaClass -
Method Summary
Modifier and TypeMethodDescriptionbuild.base.option.JDKVersionObtains theJDKVersionfor which theJavaPluginis designed to operate.build.spawn.jdk.JDKgetJDK()build.codemodel.jdk.descriptor.JDKModuleDescriptorObtains theJDKModuleDescriptorfor theProject, as defined by themodule-info.javafile.Methods inherited from interface build.spin.Extension
nameMethods inherited from interface build.spin.Plugin
invocables
-
Method Details
-
getJavaVersion
@Provides build.base.option.JDKVersion getJavaVersion()Obtains theJDKVersionfor which theJavaPluginis designed to operate.- Returns:
- the
JDKVersion
-
getJDK
@Provides build.spawn.jdk.JDK getJDK()- Returns:
- the
JDK
-
getModuleDescriptor
@Provides build.codemodel.jdk.descriptor.JDKModuleDescriptor getModuleDescriptor()Obtains theJDKModuleDescriptorfor theProject, as defined by themodule-info.javafile.Should the
Projectnot define amodule-info.javafile, say because the source is for a non-modular version of Java (pre Java 9), an attempt will be made to create a synthetic one based on the available information.For example, one may be produce using information contained in a Apache Maven POM, Apache Ivy configuration or Gradle Build File.
- Returns:
- the
JDKModuleDescriptor
-