java.lang.Object
org.gradlex.javamodule.dependencies.initialization.Module

@NullMarked public abstract class Module extends Object
  • Constructor Details

    • Module

      @Inject public Module(File directory)
  • Method Details

    • getArtifact

      public abstract org.gradle.api.provider.Property<String> getArtifact()
      The 'artifact' name of the Module. This corresponds to the Gradle subproject name. If the Module is published to a Maven repository, this is the 'artifact' in the 'group:artifact' identifier to address the published Jar.
    • getGroup

      public abstract org.gradle.api.provider.Property<String> getGroup()
      The 'group' of the Module. This corresponds to setting the 'group' property in a build.gradle file. If the Module is published to a Maven repository, this is the 'group' in the 'group:artifact' identifier to address the published Jar. The group needs to be configured here (rather than in build.gradle files) for the plugin to support additional Modules inside a subproject that other modules depend on, such as a 'testFixtures' module.
    • getModuleInfoPaths

      public abstract org.gradle.api.provider.ListProperty<String> getModuleInfoPaths()
      The paths of the module-info.java files inside the project directory. Usually, this does not need to be adjusted. By default, it contains all 'src/$sourceSetName/java/module-info.java' files that exist.
    • getPlugins

      public abstract org.gradle.api.provider.ListProperty<String> getPlugins()
    • plugin

      public void plugin(String id)
      Apply a plugin to the Module project. This is the same as using the 'plugins { }' block in the Module's build.gradle file. Applying plugins here allows you to omit build.gradle files completely.