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 Type
    Method
    Description
    build.base.option.JDKVersion
    Obtains the JDKVersion for which the JavaPlugin is designed to operate.
    build.spawn.jdk.JDK
    Obtains the JDK to be used by Tasks defined by the JavaPlugin JDKVersion.
    build.codemodel.jdk.descriptor.JDKModuleDescriptor
    Obtains the JDKModuleDescriptor for the Project, as defined by the module-info.java file.

    Methods inherited from interface build.spin.Extension

    name

    Methods inherited from interface build.spin.Plugin

    invocables
  • Method Details

    • getJavaVersion

      @Provides build.base.option.JDKVersion getJavaVersion()
      Obtains the JDKVersion for which the JavaPlugin is designed to operate.
      Returns:
      the JDKVersion
    • getJDK

      @Provides build.spawn.jdk.JDK getJDK()
      Obtains the JDK to be used by Tasks defined by the JavaPlugin JDKVersion.
      Returns:
      the JDK
    • getModuleDescriptor

      @Provides build.codemodel.jdk.descriptor.JDKModuleDescriptor getModuleDescriptor()
      Obtains the JDKModuleDescriptor for the Project, as defined by the module-info.java file.

      Should the Project not define a module-info.java file, 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