Interface MinecraftExtension

    • Method Detail

      • version

        org.gradle.api.provider.Property<java.lang.String> version()
        Get a property pointing to the version of Minecraft to prepare.

        Values of the property are unvalidated!

        There is no default value.

        Returns:
        the version
      • version

        void version​(java.lang.String version)
        Set the version of Minecraft to prepare.

        This version is only validated when the Minecraft development environment is prepared.

        Parameters:
        version - the minecraft version
      • injectedVersion

        void injectedVersion​(java.lang.Object versionFile)
        Use a version derived from a provided file.

        This allows building against Minecraft versions that may not be available in the ordinary version list, such as combat snapshots.

        Parameters:
        versionFile - a file-like object that can be handled by Project.file(Object)
      • latestRelease

        void latestRelease()
        Set the version of Minecraft used to the latest release.

        This should only be used in development workspaces or for analysis tools.

      • latestSnapshot

        void latestSnapshot()
        Set the version of Minecraft used to the latest snapshot.

        This should only be used in development workspaces or for analysis tools.

      • platform

        org.gradle.api.provider.Property<MinecraftPlatform> platform()
        Get a property pointing to the Minecraft platform being prepared.

        Default: JOINED

        Returns:
        the platform property
      • platform

        void platform​(MinecraftPlatform platform)
        Set the platform/environment of Minecraft to prepare.
        Parameters:
        platform - the platform
      • accessWideners

        void accessWideners​(java.lang.Object... file)
        Apply access wideners to the project.

        Access wideners can only be added before the first time a Minecraft dependency is resolved.

        Parameters:
        file - any file that can be passed to Project.file(Object)
      • getRuns

        RunConfigurationContainer getRuns()
        Get run configurations configured for this project.

        Every run configuration will automatically have Minecraft on its classpath.

        Returns:
        the run configuration.
      • runs

        void runs​(@DelegatesTo(value=RunConfigurationContainer.class,strategy=1)
                  groovy.lang.Closure run)
        Operate on the available run configurations.
        Parameters:
        run - a closure operating on the run configuration container
      • runs

        void runs​(org.gradle.api.Action<RunConfigurationContainer> run)
        Operate on the available run configurations.
        Parameters:
        run - an action operating on the run configuration container