Class HytaleManifestModel

java.lang.Object
net.janrupf.gradle.hytale.dev.extension.HytaleManifestModel

public abstract class HytaleManifestModel extends Object
The manifest of a Hytale plugin.
  • Constructor Details

    • HytaleManifestModel

      @Inject public HytaleManifestModel(org.gradle.api.Project project)
  • Method Details

    • getIdentifier

      public abstract org.gradle.api.provider.Property<HytaleManifestModel.Identifier> getIdentifier()
      The identifier of the Hytale plugin.
      Returns:
      the identifier property
    • getVersion

      public abstract org.gradle.api.provider.Property<String> getVersion()
      The version of the Hytale plugin.
      Returns:
      the version property
    • getDescription

      public abstract org.gradle.api.provider.Property<String> getDescription()
      The description of the Hytale plugin.
      Returns:
      the description property
    • getAuthors

      public abstract org.gradle.api.provider.ListProperty<HytaleManifestModel.Author> getAuthors()
      The authors of the Hytale plugin.
      Returns:
      the list of authors
    • getWebsite

      public abstract org.gradle.api.provider.Property<String> getWebsite()
      The website of the Hytale plugin.
      Returns:
      the website property
    • getMain

      public abstract org.gradle.api.provider.Property<String> getMain()
      The main class of the Hytale plugin.
      Returns:
      the main class property
    • getServerVersion

      public abstract org.gradle.api.provider.Property<String> getServerVersion()
      The version of the Hytale server this plugin is built for.
      Returns:
      the server version property
    • getDependencies

      public abstract org.gradle.api.provider.MapProperty<HytaleManifestModel.Identifier, String> getDependencies()
      The dependencies of the Hytale plugin.

      Maps from plugin identifier to version requirement.

      Returns:
      the map of dependencies
    • getOptionalDependencies

      public abstract org.gradle.api.provider.MapProperty<HytaleManifestModel.Identifier, String> getOptionalDependencies()
      The optional dependencies of the Hytale plugin.

      Maps from plugin identifier to version requirement.

      Returns:
      the map of optional dependencies
    • getLoadBefore

      public abstract org.gradle.api.provider.MapProperty<HytaleManifestModel.Identifier, String> getLoadBefore()
      Plugins which this plugin should be loaded before.
      Returns:
      the map of plugins which should load after this plugin
    • getDisabledByDefault

      public abstract org.gradle.api.provider.Property<Boolean> getDisabledByDefault()
      Whether this plugin is disabled by default.
      Returns:
      the is disabled by default property
    • getIncludesAssetPack

      public abstract org.gradle.api.provider.Property<Boolean> getIncludesAssetPack()
      Whether this plugin includes an asset pack.
      Returns:
      the includes asset pack property
    • identifier

      public void identifier(String name, String group)
      Change the identifier of the Hytale plugin.
      Parameters:
      name - the name
      group - the group
    • name

      public void name(String name)
      Change the name of the Hytale plugin.
      Parameters:
      name - the name
    • group

      public void group(String group)
      Change the group of the Hytale plugin.
      Parameters:
      group - the group
    • version

      public void version(String version)
      Change the version of the Hytale plugin.
      Parameters:
      version - the version
    • description

      public void description(String description)
      Change the description of the Hytale plugin.
      Parameters:
      description - the description
    • author

      public void author(org.gradle.api.Action<? super HytaleManifestModel.Author> action)
      Add an author to the Hytale plugin.
      Parameters:
      action - the action to configure the author
    • website

      public void website(String website)
      Change the website of the Hytale plugin.
      Parameters:
      website - the website
    • main

      public void main(String mainClass)
      Change the main class of the Hytale plugin.
      Parameters:
      mainClass - the main class
    • serverVersion

      public void serverVersion(String version)
      Change the server version this plugin is built for.
      Parameters:
      version - the server version
    • dependency

      public void dependency(HytaleManifestModel.Identifier id, String versionRange)
      Add a dependency to the Hytale plugin.
      Parameters:
      id - the identifier of the dependency
      versionRange - the version requirement of the dependency
    • dependency

      public void dependency(String group, String name, String versionRange)
      Add a dependency to the Hytale plugin.
      Parameters:
      group - the group of the dependency
      name - the name of the dependency
      versionRange - the version requirement of the dependency
    • optionalDependency

      public void optionalDependency(HytaleManifestModel.Identifier id, String versionRange)
      Add an optional dependency to the Hytale plugin.
      Parameters:
      id - the identifier of the optional dependency
      versionRange - the version requirement of the optional dependency
    • optionalDependency

      public void optionalDependency(String group, String name, String versionRange)
      Add an optional dependency to the Hytale plugin.
      Parameters:
      group - the group of the optional dependency
      name - the name of the optional dependency
      versionRange - the version requirement of the optional dependency
    • loadBefore

      public void loadBefore(HytaleManifestModel.Identifier id, String versionRange)
      Specify that this plugin should be loaded before another plugin.
      Parameters:
      id - the identifier of the other plugin
      versionRange - the version requirement of the other plugin
    • loadBefore

      public void loadBefore(String group, String name, String versionRange)
      Specify that this plugin should be loaded before another plugin.
      Parameters:
      group - the group of the other plugin
      name - the name of the other plugin
      versionRange - the version requirement of the other plugin
    • disableByDefault

      public void disableByDefault(boolean disabled)
      Set whether this plugin is disabled by default.
      Parameters:
      disabled - whether the plugin is disabled by default
    • includesAssetPack

      public void includesAssetPack(boolean includes)
      Set whether this plugin includes an asset pack.
      Parameters:
      includes - whether the plugin includes an asset pack
    • toMap

      public org.gradle.api.provider.Provider<Map<String,Object>> toMap()
      Serialize the manifest to a map.

      This generates a structure as expected by Hytale for plugin manifests.

      Returns:
      the manifest as a map