Skip to content

Commit

Permalink
Add entry point as property.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Aug 7, 2024
1 parent fa3ef71 commit 1d35b8a
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ public abstract class ByteBuddyLocalClassesEnhancerTask extends DefaultTask {
@Input
public abstract Property<JavaVersion> getJavaTargetCompatibilityVersion();

/**
* Returns the entry point to use for instrumentations. If not set, the instrumented classes
* will be rebased without type validation.
*
* @return The entry point to use for instrumentations.
*/
@Input
public abstract Property<EntryPoint> getEntryPoint();

/**
* Target project's local and dependencies jars.
*
Expand Down Expand Up @@ -186,7 +195,7 @@ public void execute() {
throw new IllegalStateException("Cannot resolve plugin: " + name, throwable);
}
}
Plugin.Engine.Summary summary = Plugin.Engine.Default.of(new EntryPoint.Unvalidated(EntryPoint.Default.DECORATE),
Plugin.Engine.Summary summary = Plugin.Engine.Default.of(getEntryPoint().getOrElse(new EntryPoint.Unvalidated(EntryPoint.Default.REBASE)),
classFileVersion,
MethodNameTransformer.Suffixing.withRandomSuffix())
.with(classFileLocator)
Expand Down

0 comments on commit 1d35b8a

Please sign in to comment.