Example of bytecode patching in fat-aar plugin
This project showcases how bytecode patching can be used with fat-aar plugin.
Usage
If you build and run the app, you can see it's crashing, because R file of :mylibrary cannot be found. Now, go to fat-library/build.gradle, and uncomment android.registerTransform(...)
lines, run ./gradlew :fat-library:publishAar
, and rerun the app. Now you can see, that app works fine and doesn't crash.
Additional info
More info can be found in this issue. Bytecode patcher is copied from this gist.