Interface GradleUtilsExtension
- All Known Subinterfaces:
GradleUtilsExtensionForProject
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> Deprecated, for removal: This API element is subject to removal in a future version.static final org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> Deprecated, for removal: This API element is subject to removal in a future version.static final org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> Deprecated, for removal: This API element is subject to removal in a future version.static final StringThe name for this extension. -
Method Summary
Modifier and TypeMethodDescription<T> org.gradle.api.provider.Provider<T> asProvider(Object value) Packs a (deferred) value as a provider.default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> A closure for the Forge maven to be passed intoRepositoryHandler.maven(Closure).default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> A closure for the Forge releases maven to be passed intoRepositoryHandler.maven(Closure).default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> A closure for the Minecraft libraries maven to be passed intoRepositoryHandler.maven(Closure).getPom()Utilities for working with aMavenPomfor publishing artifacts.default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> Get a configuring closure to be passed intoRepositoryHandler.maven(Closure)in a publishing block.default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(File defaultFolder) Get a configuring closure to be passed intoRepositoryHandler.maven(Closure)in a publishing block.org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(String fallbackPublishingEndpoint) Get a configuring closure to be passed intoRepositoryHandler.maven(Closure)in a publishing block.org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(String fallbackPublishingEndpoint, File defaultFolder) Get a configuring closure to be passed intoRepositoryHandler.maven(Closure)in a publishing block.org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(String fallbackPublishingEndpoint, Object defaultFolder) Get a configuring closure to be passed intoRepositoryHandler.maven(Closure)in a publishing block.org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(String fallbackPublishingEndpoint, org.gradle.api.file.Directory defaultFolder) Get a configuring closure to be passed intoRepositoryHandler.maven(Closure)in a publishing block.org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(String fallbackPublishingEndpoint, org.gradle.api.provider.Provider<?> defaultFolder) Get a configuring closure to be passed intoRepositoryHandler.maven(Closure)in a publishing block.default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(org.gradle.api.file.Directory defaultFolder) Get a configuring closure to be passed intoRepositoryHandler.maven(Closure)in a publishing block.default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(org.gradle.api.provider.Provider<?> defaultFolder) Get a configuring closure to be passed intoRepositoryHandler.maven(Closure)in a publishing block.default <T> TUnpacks a deferred value.
-
Field Details
-
NAME
-
forgeMaven
@Deprecated(forRemoval=true, since="3.3.28") @ScheduledForRemoval(inVersion="4.0.0") static final org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> forgeMavenDeprecated, for removal: This API element is subject to removal in a future version.UsegetForgeMaven() -
forgeReleaseMaven
@Deprecated(forRemoval=true, since="3.3.28") @ScheduledForRemoval(inVersion="4.0.0") static final org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> forgeReleaseMavenDeprecated, for removal: This API element is subject to removal in a future version. -
minecraftLibsMaven
@Deprecated(forRemoval=true, since="3.3.28") @ScheduledForRemoval(inVersion="4.0.0") static final org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> minecraftLibsMavenDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getForgeMaven
default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getForgeMaven()A closure for the Forge maven to be passed intoRepositoryHandler.maven(Closure).repositories { maven fg.forgeMaven } -
getForgeReleaseMaven
default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getForgeReleaseMaven()A closure for the Forge releases maven to be passed intoRepositoryHandler.maven(Closure).repositories { maven fg.forgeReleaseMaven }- See Also:
-
getMinecraftLibsMaven
default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getMinecraftLibsMaven()A closure for the Minecraft libraries maven to be passed intoRepositoryHandler.maven(Closure).repositories { maven fg.minecraftLibsMaven } -
getPublishingForgeMaven
default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven()Get a configuring closure to be passed into
RepositoryHandler.maven(Closure)in a publishing block.Important: The following environment variables must be set for this to work:
MAVEN_USER: Containing the username to use for authenticationMAVEN_PASSWORD: Containing the password to use for authentication
The following environment variables are optional:
MAVEN_URL(_RELEASE): Containing the URL to use for the release repository- Please note that since Forge does not have a snapshot repository, snapshot maven publishing via GradleUtils is no longer supported as of 3.0.0.
If the required environment variables are not present, the output Maven will be a local folder named
repoon the root of the build directory.If the
MAVEN_URL_RELEASEvariable is not set, the Forge releases repository will be used (https://maven.minecraftforge.net/releases).- Returns:
- The closure
-
getPublishingForgeMaven
org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(String fallbackPublishingEndpoint) Get a configuring closure to be passed into
RepositoryHandler.maven(Closure)in a publishing block.Important: The following environment variables must be set for this to work:
MAVEN_USER: Containing the username to use for authenticationMAVEN_PASSWORD: Containing the password to use for authentication
The following environment variables are optional:
MAVEN_URL(_RELEASE): Containing the URL to use for the release repository- Please note that since Forge does not have a snapshot repository, snapshot maven publishing via GradleUtils is no longer supported as of 3.0.0.
If the required environment variables are not present, the output Maven will be a local folder named
repoon the root of the build directory.If the
MAVEN_URL_RELEASEvariable is not set, the passed in fallback URL will be used for the release repository.- Parameters:
fallbackPublishingEndpoint- The fallback URL for the release repository- Returns:
- The closure
-
getPublishingForgeMaven
org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(String fallbackPublishingEndpoint, Object defaultFolder) Get a configuring closure to be passed into
RepositoryHandler.maven(Closure)in a publishing block. Important: The following environment variables must be set for this to work:MAVEN_USER: Containing the username to use for authenticationMAVEN_PASSWORD: Containing the password to use for authentication
The following environment variables are optional:
MAVEN_URL(_RELEASE): Containing the URL to use for the release repository- Please note that since Forge does not have a snapshot repository, snapshot maven publishing via GradleUtils is no longer supported as of 3.0.0.
If the required environment variables are not present, the output Maven will be set to the given default folder.
If the
MAVEN_URL(_RELEASE)variable is not set, the passed in fallback URL will be used for the release repository.- Parameters:
fallbackPublishingEndpoint- The fallback URL for the release repositorydefaultFolder- The default folder if the required maven information is not set- Returns:
- The closure
-
getPublishingForgeMaven
default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(File defaultFolder) Get a configuring closure to be passed into
RepositoryHandler.maven(Closure)in a publishing block.Important: The following environment variables must be set for this to work:
MAVEN_USER: Containing the username to use for authenticationMAVEN_PASSWORD: Containing the password to use for authentication
The following environment variables are optional:
MAVEN_URL(_RELEASE): Containing the URL to use for the release repository- Please note that since Forge does not have a snapshot repository, snapshot maven publishing via GradleUtils is no longer supported as of 3.0.0.
If the required environment variables are not present, the output Maven will be set to the given default folder.
If the
MAVEN_URL_RELEASEvariable is not set, the Forge releases repository will be used (https://maven.minecraftforge.net/releases).- Parameters:
defaultFolder- The default folder if the required maven information is not set- Returns:
- The closure
-
getPublishingForgeMaven
org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(String fallbackPublishingEndpoint, File defaultFolder) Get a configuring closure to be passed into
RepositoryHandler.maven(Closure)in a publishing block. Important: The following environment variables must be set for this to work:MAVEN_USER: Containing the username to use for authenticationMAVEN_PASSWORD: Containing the password to use for authentication
The following environment variables are optional:
MAVEN_URL(_RELEASE): Containing the URL to use for the release repository- Please note that since Forge does not have a snapshot repository, snapshot maven publishing via GradleUtils is no longer supported as of 3.0.0.
If the required environment variables are not present, the output Maven will be set to the given default folder.
If the
MAVEN_URL(_RELEASE)variable is not set, the passed in fallback URL will be used for the release repository.- Parameters:
fallbackPublishingEndpoint- The fallback URL for the release repositorydefaultFolder- The default folder if the required maven information is not set- Returns:
- The closure
-
getPublishingForgeMaven
default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(org.gradle.api.file.Directory defaultFolder) Get a configuring closure to be passed into
RepositoryHandler.maven(Closure)in a publishing block.Important: The following environment variables must be set for this to work:
MAVEN_USER: Containing the username to use for authenticationMAVEN_PASSWORD: Containing the password to use for authentication
The following environment variables are optional:
MAVEN_URL(_RELEASE): Containing the URL to use for the release repository- Please note that since Forge does not have a snapshot repository, snapshot maven publishing via GradleUtils is no longer supported as of 3.0.0.
If the required environment variables are not present, the output Maven will be set to the given default folder.
If the
MAVEN_URL_RELEASEvariable is not set, the Forge releases repository will be used (https://maven.minecraftforge.net/releases).- Parameters:
defaultFolder- The default folder if the required maven information is not set- Returns:
- The closure
-
getPublishingForgeMaven
org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(String fallbackPublishingEndpoint, org.gradle.api.file.Directory defaultFolder) Get a configuring closure to be passed into
RepositoryHandler.maven(Closure)in a publishing block. Important: The following environment variables must be set for this to work:MAVEN_USER: Containing the username to use for authenticationMAVEN_PASSWORD: Containing the password to use for authentication
The following environment variables are optional:
MAVEN_URL(_RELEASE): Containing the URL to use for the release repository- Please note that since Forge does not have a snapshot repository, snapshot maven publishing via GradleUtils is no longer supported as of 3.0.0.
If the required environment variables are not present, the output Maven will be set to the given default folder.
If the
MAVEN_URL(_RELEASE)variable is not set, the passed in fallback URL will be used for the release repository.- Parameters:
fallbackPublishingEndpoint- The fallback URL for the release repositorydefaultFolder- The default folder if the required maven information is not set- Returns:
- The closure
-
getPublishingForgeMaven
default org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(org.gradle.api.provider.Provider<?> defaultFolder) Get a configuring closure to be passed into
RepositoryHandler.maven(Closure)in a publishing block.Important: The following environment variables must be set for this to work:
MAVEN_USER: Containing the username to use for authenticationMAVEN_PASSWORD: Containing the password to use for authentication
The following environment variables are optional:
MAVEN_URL(_RELEASE): Containing the URL to use for the release repository- Please note that since Forge does not have a snapshot repository, snapshot maven publishing via GradleUtils is no longer supported as of 3.0.0.
If the required environment variables are not present, the output Maven will be set to the given default folder.
If the
MAVEN_URL_RELEASEvariable is not set, the Forge releases repository will be used (https://maven.minecraftforge.net/releases).- Parameters:
defaultFolder- The default folder if the required maven information is not set- Returns:
- The closure
-
getPublishingForgeMaven
org.gradle.api.Action<org.gradle.api.artifacts.repositories.MavenArtifactRepository> getPublishingForgeMaven(String fallbackPublishingEndpoint, org.gradle.api.provider.Provider<?> defaultFolder) Get a configuring closure to be passed into
RepositoryHandler.maven(Closure)in a publishing block. Important: The following environment variables must be set for this to work:MAVEN_USER: Containing the username to use for authenticationMAVEN_PASSWORD: Containing the password to use for authentication
The following environment variables are optional:
MAVEN_URL(_RELEASE): Containing the URL to use for the release repository- Please note that since Forge does not have a snapshot repository, snapshot maven publishing via GradleUtils is no longer supported as of 3.0.0.
If the required environment variables are not present, the output Maven will be set to the given default folder.
If the
MAVEN_URL(_RELEASE)variable is not set, the passed in fallback URL will be used for the release repository.- Parameters:
fallbackPublishingEndpoint- The fallback URL for the release repositorydefaultFolder- The default folder if the required maven information is not set- Returns:
- The closure
-
getPom
PomUtils getPom()Utilities for working with aMavenPomfor publishing artifacts.- Returns:
- The POM utilities
- See Also:
-
unpack
Unpacks a deferred value.
Since buildscripts are dynamically compiled, this allows buildscript authors to use this method with version catalog entries, other provider-like objects. This prevents the need to arbitrarily call
Provider.get()(or similar) on values which may or may not be deferred based on circumstance.- Type Parameters:
T- The type of value held by the provider- Parameters:
value- The value to unpack- Returns:
- The unpacked value
-
asProvider
Packs a (deferred) value as a provider.
Since buildscripts are dynamically compiled, this allows buildscript authors to use this method with version catalog entries, other provider-like objects. This prevents the need to call
ProviderConvertible.asProvider()or otherwise create arbitrary providers usingProviderFactory.provider(Callable)on values which may or may not be deferred based on circumstance.- Type Parameters:
T- The type of value held by the provider- Parameters:
value- The value to pack- Returns:
- The packed value
-
getForgeMaven()