T - The type of the task this extension represents.public abstract class AbstractByteBuddyTaskExtension<T extends AbstractByteBuddyTask>
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractByteBuddyTaskExtension(org.gradle.api.Project project)
Creates a new abstract Byte Buddy task extension.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure(T task)
Applies this extension's properties.
|
protected abstract void |
doConfigure(T task)
Applies any extension-specific properties.
|
Adjustment |
getAdjustment()
Determines the adjustment for tasks that might depend on post-processed compile tasks.
|
Adjustment.ErrorHandler |
getAdjustmentErrorHandler()
Returns the error handler to be used when a task dependency cannot be resolved.
|
org.gradle.api.Action<org.gradle.api.Task> |
getAdjustmentPostProcessor()
Returns the adjustment post processor that is applied after the graph dependencies are is resolved.
|
net.bytebuddy.ClassFileVersion |
getClassFileVersion()
Returns the class file version to use for creating auxiliary types or
null if the
version is determined implicitly. |
Discovery |
getDiscovery()
Determines the discovery for finding plugins on the class path.
|
net.bytebuddy.build.EntryPoint |
getEntryPoint()
Returns the entry point to use.
|
java.lang.String |
getSuffix()
Returns the suffix to use for rebased methods or the empty string if a random suffix should be used.
|
int |
getThreads()
Returns the number of threads to use for transforming or
0 if the transformation should be applied in the main thread. |
java.util.List<Transformation> |
getTransformations()
Returns the transformations to apply.
|
boolean |
isExtendedParsing()
Returns
true if extended parsing should be used. |
boolean |
isFailFast()
Returns
true if a warning should be issued for an empty type set. |
boolean |
isFailOnLiveInitializer()
Returns
true if the transformation should fail if a live initializer is used. |
boolean |
isLazy()
Returns
true, task dependencies are only adjusted when the task graph is fully resolved. |
boolean |
isWarnOnEmptyTypeSet()
Returns
true if a warning should be issued for an empty type set. |
protected void |
resolve(org.gradle.api.JavaVersion version)
Resolves default properties and considers the contextual Java version.
|
void |
setAdjustment(Adjustment adjustment)
Determines the adjustment for tasks that might depend on post-processed compile tasks.
|
void |
setAdjustmentErrorHandler(Adjustment.ErrorHandler adjustmentErrorHandler)
Sets the error handler to be used when a task dependency cannot be resolved.
|
void |
setAdjustmentPostProcessor(org.gradle.api.Action<org.gradle.api.Task> adjustmentPostProcessor)
Sets the adjustment post processor that is applied after the graph dependencies are resolved.
|
void |
setClassFileVersion(net.bytebuddy.ClassFileVersion classFileVersion)
Sets the class file version to use for creating auxiliary types or
null if the
version is determined implicitly. |
void |
setDiscovery(Discovery discovery)
Determines the discovery for finding plugins on the class path.
|
void |
setEntryPoint(net.bytebuddy.build.EntryPoint entryPoint)
Sets the entry point to use.
|
void |
setExtendedParsing(boolean extendedParsing)
Determines if extended parsing should be used.
|
void |
setFailFast(boolean failFast)
Determines if a warning should be issued for an empty type set.
|
void |
setFailOnLiveInitializer(boolean failOnLiveInitializer)
Determines if the transformation should fail if a live initializer is used.
|
void |
setLazy(boolean lazy)
If set to
true, task dependencies are only adjusted when the task graph is fully resolved. |
void |
setSuffix(java.lang.String suffix)
Sets the suffix to use for rebased methods or the empty string if a random suffix should be used.
|
void |
setThreads(int threads)
Sets the number of threads to use for transforming or
0 if the transformation should be applied in the main thread. |
void |
setWarnOnEmptyTypeSet(boolean warnOnEmptyTypeSet)
Returns
true if a warning should be issued for an empty type set. |
protected abstract java.lang.Class<? extends T> |
toType()
Returns the type of the Byte Buddy task.
|
void |
transformation(org.gradle.api.Action<Transformation> action)
Adds an additional transformation.
|
void |
transformation(groovy.lang.Closure<Transformation> closure)
Adds an additional transformation.
|
protected AbstractByteBuddyTaskExtension(@UnknownNull
org.gradle.api.Project project)
project - The current Gradle project.public java.util.List<Transformation> getTransformations()
public void transformation(groovy.lang.Closure<Transformation> closure)
closure - The closure to configure the transformation.public void transformation(org.gradle.api.Action<Transformation> action)
action - The action to configure the transformation.public net.bytebuddy.build.EntryPoint getEntryPoint()
public void setEntryPoint(net.bytebuddy.build.EntryPoint entryPoint)
entryPoint - The entry point to use.public java.lang.String getSuffix()
public void setSuffix(java.lang.String suffix)
suffix - The suffix to use for rebased methods or the empty string if a random suffix should be used.public boolean isFailOnLiveInitializer()
true if the transformation should fail if a live initializer is used.true if the transformation should fail if a live initializer is used.public void setFailOnLiveInitializer(boolean failOnLiveInitializer)
failOnLiveInitializer - true if the transformation should fail if a live initializer is used.public boolean isWarnOnEmptyTypeSet()
true if a warning should be issued for an empty type set.true if a warning should be issued for an empty type set.public void setWarnOnEmptyTypeSet(boolean warnOnEmptyTypeSet)
true if a warning should be issued for an empty type set.warnOnEmptyTypeSet - true if a warning should be issued for an empty type set.public boolean isFailFast()
true if a warning should be issued for an empty type set.true if a warning should be issued for an empty type set.public void setFailFast(boolean failFast)
failFast - true if a warning should be issued for an empty type set.public boolean isExtendedParsing()
true if extended parsing should be used.true if extended parsing should be used.public void setExtendedParsing(boolean extendedParsing)
extendedParsing - true if extended parsing should be used.public Discovery getDiscovery()
public void setDiscovery(Discovery discovery)
discovery - The discovery for finding plugins on the class path.public Adjustment getAdjustment()
public void setAdjustment(Adjustment adjustment)
adjustment - The adjustment for tasks that might depend on post-processed compile tasks.public Adjustment.ErrorHandler getAdjustmentErrorHandler()
public void setAdjustmentErrorHandler(Adjustment.ErrorHandler adjustmentErrorHandler)
adjustmentErrorHandler - The error handler to be used when a task dependency cannot be resolved.public org.gradle.api.Action<org.gradle.api.Task> getAdjustmentPostProcessor()
public void setAdjustmentPostProcessor(org.gradle.api.Action<org.gradle.api.Task> adjustmentPostProcessor)
adjustmentPostProcessor - The adjustment post processor to apply.public int getThreads()
0 if the transformation should be applied in the main thread.0 if the transformation should be applied in the main thread.public void setThreads(int threads)
0 if the transformation should be applied in the main thread.threads - The number of threads to use for transforming or 0 if the transformation should be applied in the main thread.public boolean isLazy()
true, task dependencies are only adjusted when the task graph is fully resolved.true, task dependencies are only adjusted when the task graph is fully resolved.public void setLazy(boolean lazy)
true, task dependencies are only adjusted when the task graph is fully resolved.lazy - true, task dependencies are only adjusted when the task graph is fully resolved.@MaybeNull public net.bytebuddy.ClassFileVersion getClassFileVersion()
null if the
version is determined implicitly.public void setClassFileVersion(@MaybeNull
net.bytebuddy.ClassFileVersion classFileVersion)
null if the
version is determined implicitly.classFileVersion - The class file version to use for creating auxiliary types.protected void resolve(org.gradle.api.JavaVersion version)
version - The Java version to resolve as a fallback if no explicit version is set.protected abstract void doConfigure(T task)
task - The task to configure.protected void configure(T task)
task - The task to configure.protected abstract java.lang.Class<? extends T> toType()