Package com.modrinth.minotaur
Class ModrinthExtension
java.lang.Object
com.modrinth.minotaur.dependencies.container.DependencyDSL
com.modrinth.minotaur.ModrinthExtension
Class defining the extension used for configuring
TaskModrinthUpload. This is done via the modrinth
{...} block in the buildscript.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default API URL in use for uploading.static final StringThe default changelog if one was not provided.static final StringDeprecated.static final StringThe default release type if one was not provided.final org.gradle.api.provider.ListProperty<String>final org.gradle.api.provider.ListProperty<String>static final StringThe staging API URL if desired for testing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadditionalFiles(org.gradle.api.Action<? super AdditionalFileDSL> action) org.gradle.api.provider.ListProperty<Object>org.gradle.api.provider.Property<String>This should not be changed unless you know what you're doing.org.gradle.api.provider.Property<Boolean>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<Boolean>org.gradle.api.provider.ListProperty<Dependency>org.gradle.api.provider.Property<Boolean>org.gradle.api.provider.Property<Boolean>org.gradle.api.file.RegularFilePropertygetFile()The upload artifact file.org.gradle.api.provider.ListProperty<String>org.gradle.api.provider.ListProperty<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>getToken()Make sure you keep this private!org.gradle.api.provider.Property<Object>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>Methods inherited from class com.modrinth.minotaur.dependencies.container.DependencyDSL
getEmbedded, getIncompatible, getNamedDependenciesAsList, getOptional, getRequired
-
Field Details
-
gameVersions
-
loaders
-
DEFAULT_API_URL
The default API URL in use for uploading. Exposed as a fallback utility.- See Also:
-
STAGING_API_URL
The staging API URL if desired for testing.- See Also:
-
DEFAULT_TOKEN
Deprecated.The default token in use for uploading. Exposed as a fallback utility. -
DEFAULT_CHANGELOG
The default changelog if one was not provided. Exposed as a fallback utility.- See Also:
-
DEFAULT_VERSION_TYPE
The default release type if one was not provided. Exposed as a fallback utility.- See Also:
-
-
Constructor Details
-
ModrinthExtension
public ModrinthExtension(org.gradle.api.Project project) - Parameters:
project- The Gradle project that the extension is applied to
-
-
Method Details
-
additionalFiles
-
getAdditionalFileDsl
-
getApiUrl
This should not be changed unless you know what you're doing. Its main use case is for debug, development, or advanced user configurations.- Returns:
- The URL used for communicating with Modrinth.
-
getToken
Make sure you keep this private!- Returns:
- The API token used to communicate with Modrinth.
-
getProjectId
- Returns:
- The ID of the project to upload the file to.
-
getVersionNumber
- Returns:
- The version number of the project being uploaded.
-
getVersionName
- Returns:
- The version name of the project being uploaded. Defaults to the version number.
-
getChangelog
- Returns:
- A list or summary of each of the changes made to the project since the last update.
-
getUploadFile
- Returns:
- The upload artifact file. This can be any object type that is resolvable by
Util.resolveFile(Project, Object).
-
getFile
public org.gradle.api.file.RegularFileProperty getFile()The upload artifact file.- Returns:
- file property
-
getAdditionalFiles
- Returns:
- Any additional files to be uploaded to the new version.
-
getVersionType
- Returns:
- The version type for the project. See
ProjectVersion.VersionType.
-
getGameVersions
- Returns:
- The game versions of the game the version supports.
-
getLoaders
- Returns:
- The mod loaders of the game the version supports.
-
getDependencies
- Returns:
- The dependencies of the version.
-
getFailSilently
- Returns:
- Whether the build should continue even if the upload failed.
-
getDetectLoaders
- Returns:
- Whether the plugin will try to define loaders based on other plugins in the project environment.
-
getDebugMode
- Returns:
- Whether the plugin is in debug mode. Debug mode does not actually upload any files.
-
getSyncBodyFrom
- Returns:
- The file to sync the project's body description from
-
getAutoAddDependsOn
- Returns:
- Whether to automatically add the `dependsOn` information for upload files
-