Skip to content

Commit b53e514

Browse files
committed
Adjust readme and default entry point for Android.
1 parent 220250a commit b53e514

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

byte-buddy-gradle-plugin/android-plugin/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ For your compiler plugin to be able of getting recognized as a Byte Buddy compil
3030

3131
## Special behaviour
3232

33-
As the plugin support relies on Android's build APIs, the instrumentation of Android plugins differs in the following ways.
33+
This plugin can be used without restrictions for newer versions of Android. However, since Kotlin is used in many Android projects, the default `EntryPoint` is set to decoration without validation. The default would be to define the `EntryPoint` to `REBASE`. Kotlin, until very recent versions, issues erroneous type information which causes parsing errors when types are inflated what often fails the instrumentation. The default might be revised in the future, if this problem becomes less of an issue. To pin the `EntryPoint`, one should set it explicitly.
34+
35+
For older versions of Android, more restrictions apply. Previously, the plugin had to rely on Android's build APIs, the instrumentation of Android plugins differs in the following ways.
3436

3537
- You cannot instrument classes that belong to the [Android SDK](https://developer.android.com/reference/packages) or to the core JVM. However, you can instrument classes that are defined by libraries on Android application projects. However, you can instrument libraries only on Android application projects, not [Android libraries](https://developer.android.com/studio/projects/android-library) projects.
3638
- You cannot add additional classes during an instrumentation as those cannot be added to a project using Android's current APIs. As a consequence, it is currently only possible to apply decorating transformations.

byte-buddy-gradle-plugin/android-plugin/src/main/java/net/bytebuddy/build/gradle/android/ByteBuddyAndroidTaskExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public class ByteBuddyAndroidTaskExtension {
9797
public ByteBuddyAndroidTaskExtension(Project project) {
9898
this.project = project;
9999
transformations = new ArrayList<Transformation>();
100-
entryPoint = EntryPoint.Default.REBASE;
100+
entryPoint = new EntryPoint.Unvalidated(EntryPoint.Default.DECORATE);
101101
suffix = "";
102102
failOnLiveInitializer = true;
103103
warnOnEmptyTypeSet = true;

0 commit comments

Comments
 (0)