Class CompatibilityProjectExtension
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.Closure<@Nullable Void>
org.gradle.plugin.compatibility.internal.groovy.CompatibilityProjectExtension
- All Implemented Interfaces:
groovy.lang.GroovyCallable<Void>,groovy.lang.GroovyObject,Serializable,Cloneable,Runnable,Callable<Void>
An extension that provides
Project.compatibility(PluginDeclaration, Closure) for Gradle before 8.14. The
doCall(PluginDeclaration, Closure) is effectively the public API.- See Also:
-
Field Summary
Fields inherited from class groovy.lang.Closure
DELEGATE_FIRST, DELEGATE_ONLY, DONE, IDENTITY, maximumNumberOfParameters, OWNER_FIRST, OWNER_ONLY, parameterTypes, SKIP, TO_SELF -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable VoiddoCall(groovy.lang.Closure<?> ignored) A helper that provides a nicer error message when the build logic uses modern syntax on the old Gradle version.@Nullable VoiddoCall(org.gradle.plugin.devel.PluginDeclaration declaration, groovy.lang.Closure<?> configuration) Configure the provided declaration, maybe lazily.org.gradle.api.ProjectgetOwner()static voidinstall(org.gradle.api.Project project) Register the necessary extensions so the compatibility syntax works.Methods inherited from class groovy.lang.Closure
andThen, andThenSelf, andThenSelf, asWritable, call, call, call, clone, compose, composeSelf, composeSelf, curry, curry, dehydrate, getDelegate, getDirective, getMaximumNumberOfParameters, getParameterTypes, getProperty, getResolveStrategy, getThisObject, isCase, leftShift, leftShift, memoize, memoizeAtLeast, memoizeAtMost, memoizeBetween, ncurry, ncurry, rcurry, rcurry, rehydrate, rightShift, run, setDelegate, setDirective, setProperty, setResolveStrategy, throwRuntimeException, trampoline, trampolineMethods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, setMetaClassMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface groovy.lang.GroovyObject
invokeMethod
-
Constructor Details
-
CompatibilityProjectExtension
@Inject public CompatibilityProjectExtension(org.gradle.api.Project owner)
-
-
Method Details
-
getOwner
public org.gradle.api.Project getOwner()- Overrides:
getOwnerin classgroovy.lang.Closure<@Nullable Void>
-
doCall
A helper that provides a nicer error message when the build logic uses modern syntax on the old Gradle version.- Parameters:
ignored- configuration closure- Returns:
- nothing
- Throws:
UnsupportedOperationException- always
-
doCall
public @Nullable Void doCall(org.gradle.plugin.devel.PluginDeclaration declaration, groovy.lang.Closure<?> configuration) Configure the provided declaration, maybe lazily.This method is part of the public API.
- Parameters:
declaration- the declaration to configureconfiguration- the configuration closure- Returns:
null
-
install
public static void install(org.gradle.api.Project project) Register the necessary extensions so the compatibility syntax works. This method should be only used internally.- Parameters:
project- the project to which the plugin is applied
-