Interface GradleUtilsExtensionForProject
- All Superinterfaces:
GradleUtilsExtension
GradleUtilsExtension that is given to projects. Includes additional convenience methods that only
apply to projects.-
Field Summary
Fields inherited from interface net.minecraftforge.gradleutils.GradleUtilsExtension
forgeMaven, forgeReleaseMaven, minecraftLibsMaven, NAME -
Method Summary
Modifier and TypeMethodDescriptionorg.gradle.api.provider.Property<String> The display name for the project.org.gradle.api.provider.Property<String> The vendor for the project.default voidmanifestDefaults(org.gradle.api.java.archives.Manifest manifest, String packageName) voidmanifestDefaults(org.gradle.api.java.archives.Manifest manifest, String packageName, Map<? extends CharSequence, ?> additionalEntries) voidpluginDevDefaults(org.gradle.api.artifacts.ConfigurationContainer configurations, CharSequence gradleVersion) Applies known defaults for Minecraft Forge's Gradle plugins.voidpluginDevDefaults(org.gradle.api.artifacts.ConfigurationContainer configurations, org.gradle.api.provider.Provider<? extends CharSequence> gradleVersion) Applies known defaults for Minecraft Forge's Gradle plugins.default voidpluginDevDefaults(org.gradle.api.artifacts.ConfigurationContainer configurations, org.gradle.api.provider.ProviderConvertible<? extends CharSequence> gradleVersion) Applies known defaults for Minecraft Forge's Gradle plugins.default org.gradle.api.tasks.TaskProvider<? extends PromotePublication> promote(org.gradle.api.publish.maven.MavenPublication publication) Promotes a publication to the Forge Files Site.org.gradle.api.tasks.TaskProvider<? extends PromotePublication> promote(org.gradle.api.publish.maven.MavenPublication publication, org.gradle.api.Action<? super PromotePublication> cfg) Promotes a publication to the Forge Files Site.Methods inherited from interface net.minecraftforge.gradleutils.GradleUtilsExtension
getPom, getPublishingForgeMaven, getPublishingForgeMaven, getPublishingForgeMaven, getPublishingForgeMaven, getPublishingForgeMaven, getPublishingForgeMaven, getPublishingForgeMaven, getPublishingForgeMaven, getPublishingForgeMaven, unpack, unpack, unpack, unpack, unpack, unpack, unpack
-
Method Details
-
getDisplayName
org.gradle.api.provider.Property<String> getDisplayName()The display name for the project.
If the relevant properties are enabled, it is used in areas such as the Javadoc window title, among other things. This also is used with
manifestDefaults(org.gradle.api.java.archives.Manifest, java.lang.String)to reduce buildscript boilerplate.- Returns:
- The property for the display name
-
getVendor
org.gradle.api.provider.Property<String> getVendor()The vendor for the project.
This is used with
manifestDefaults(org.gradle.api.java.archives.Manifest, java.lang.String)to reduce buildscript boilerplate.- Returns:
- The property for the vendor
-
manifestDefaults
-
manifestDefaults
void manifestDefaults(org.gradle.api.java.archives.Manifest manifest, String packageName, Map<? extends CharSequence, ?> additionalEntries) -
pluginDevDefaults
void pluginDevDefaults(org.gradle.api.artifacts.ConfigurationContainer configurations, CharSequence gradleVersion) Applies known defaults for Minecraft Forge's Gradle plugins.
- For all configurations that
contain (ignoring case) "runtimeElements", the
GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTEattribute with the value of the given Gradle version.
- Parameters:
configurations- The configurations container to apply defaults togradleVersion- The Gradle version to target
- For all configurations that
contain (ignoring case) "runtimeElements", the
-
pluginDevDefaults
void pluginDevDefaults(org.gradle.api.artifacts.ConfigurationContainer configurations, org.gradle.api.provider.Provider<? extends CharSequence> gradleVersion) Applies known defaults for Minecraft Forge's Gradle plugins.
- For all configurations that
contain (ignoring case) "runtimeElements", the
GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTEattribute with the value of the given Gradle version.
- Parameters:
configurations- The configurations container to apply defaults togradleVersion- The Gradle version to target
- For all configurations that
contain (ignoring case) "runtimeElements", the
-
pluginDevDefaults
default void pluginDevDefaults(org.gradle.api.artifacts.ConfigurationContainer configurations, org.gradle.api.provider.ProviderConvertible<? extends CharSequence> gradleVersion) Applies known defaults for Minecraft Forge's Gradle plugins.
- For all configurations that
contain (ignoring case) "runtimeElements", the
GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTEattribute with the value of the given Gradle version.
- Parameters:
configurations- The configurations container to apply defaults togradleVersion- The Gradle version to target
- For all configurations that
contain (ignoring case) "runtimeElements", the
-
promote
default org.gradle.api.tasks.TaskProvider<? extends PromotePublication> promote(org.gradle.api.publish.maven.MavenPublication publication) Promotes a publication to the Forge Files Site.
Publications that are promoted will automatically have the relevant task added as a finalizer to the
publishPublicationToForgeRepositorytask, where the publication matches the task's publication and the repository name is "forge". The publishing Forge repo added viaGradleUtilsExtension.getPublishingForgeMaven()always sets it with the name "forge".- Parameters:
publication- The publication to promote- Returns:
- The provider for the promotion task
-
promote
org.gradle.api.tasks.TaskProvider<? extends PromotePublication> promote(org.gradle.api.publish.maven.MavenPublication publication, org.gradle.api.Action<? super PromotePublication> cfg) Promotes a publication to the Forge Files Site.
Publications that are promoted will automatically have the relevant task added as a finalizer to the
publishPublicationToForgeRepositorytask, where the publication matches the task's publication and the repository name is "forge". The publishing Forge repo added viaGradleUtilsExtension.getPublishingForgeMaven()always sets it with the name "forge".- Parameters:
publication- The publication to promotecfg- A configuring action for the task- Returns:
- The provider for the promotion task
-