Ibotta / gradle-aspectj-pipeline-plugin

A Gradle plugin for Android projects which performs AspectJ weaving using Android's bytcode manipulation pipeline.
Apache License 2.0
75 stars 15 forks source link

Don't work with Dynamic-delivery modules #11

Closed audiserg closed 2 years ago

audiserg commented 3 years ago

For dynamic-modules build.gradle must have: apply plugin: 'com.android.dynamic-feature Try to build: Caused by: org.gradle.api.GradleException: 'com.android.application' or 'com.android.library' plugin required.

audiserg commented 3 years ago

I try to build in local fr solving, but when i set classpath files('libs/plugin-1.1.0.jar'), result of project building is Unable to load class 'org.aspectj.bridge.MessageHandler'

eschlenz commented 3 years ago

Thanks @audiserg. I don't personally have any experience with dynamic feature modules. Do you have a sample app that demonstrates the issue, and that we might be able to use to investigate? If so, I'd be happy to use that to try and figure out what the issue is, and whether or not we can find a simple fix.

audiserg commented 3 years ago

Hi @eschlenz. I fix issue with next strings in pipelineAopWeaverPlugin: 46 val isDynamicLibrary = project.plugins.hasPlugin(DynamicFeaturePlugin::class.java) 48 if (!isAndroid && !isLibrary && !isDynamicLibrary) 57 val variants = if (isAndroid or isDynamicLibrary) I tested with local Maven Repo and this solution is work. I am not sure, is this best solution. You can check with this public dynamic-feature module examples: https://www.raywenderlich.com/7023243-navigation-and-dynamic-features or https://github.com/googlecodelabs/android-dynamic-features . Thank you ! PipelineAopWeaverPlugin.zip upd !!IMPORTANT!!: Need specify aopWeave { filter = "com/examplle/myapp/feature1" } in every dynamic module

eschlenz commented 3 years ago

@audiserg I got a few emails from you/GitHub last night, but it looks like the last comment about your fix not working was possibly deleted. Did your solution work for you? If so, we can talk about next steps to incorporate it into the plugin formally, and get a new release out.

audiserg commented 3 years ago

@eschlenz Yes, adding aopWeave in every build.gradle in modules and changes in my previous message help me. Without filtering I have a error from AspectJ in AOP.log ,when Aspect process google classes. You can contact me via email rivno@mail.ru

eschlenz commented 2 years ago

Hey @audiserg. I just merged your PR after some local testing, and released it. I think we can call this issue closed now. I'll reopen if not.

Again, sorry for the delay!