diff --git a/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyLocalClassesEnhancerTask.java b/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyLocalClassesEnhancerTask.java index 733dcfd9c7..ced621ec84 100644 --- a/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyLocalClassesEnhancerTask.java +++ b/byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyLocalClassesEnhancerTask.java @@ -87,6 +87,15 @@ public abstract class ByteBuddyLocalClassesEnhancerTask extends DefaultTask { @Input public abstract Property 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 getEntryPoint(); + /** * Target project's local and dependencies jars. * @@ -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)