Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Example requested for AspectJ postcompile weaving] for the case when aspects are depending on java code (not found on examples) #371

Closed
adrian-n-balaban opened this issue Jul 19, 2021 · 1 comment

Comments

@adrian-n-balaban
Copy link

adrian-n-balaban commented Jul 19, 2021

Hello,

Compilation and weaving is done in one step, for about 7000 .java files and about 20 .aj files and also 3 external jar with aspects.

The project is aligned (using gradle 7.1.1, plugin version 6.0.0-m2, and aspectj version 1.8.9).

I've checked the aspectj plugin examples and realized that the example from module 'weaving' is not fitted for us because
in our case the aspects depends on java code, and in the examples the java code module depends on aspects module.

I've tested splitting the unique step and module into 3 steps and modules, as specified below. After doing those changes, the java incremental compiling is working on module-java, as expected, but, the jar output of the last module, module-weaving is not correct.

  • module-java with only the .java files
  • module-aspects with only .aj files, and having in the dependencies, implementation project(':module-java')
  • module-weaving, without sources, not using postcompile plugin, and having in the dependencies:
    implementation project(':module-java')
    aspect project(':module-aspects')
    aspect "external-jar-1"
    aspect "external-jar-2"
    aspect "external-jar-3"

Thank you !

@adrian-n-balaban adrian-n-balaban changed the title AspectJ postcompile weaving example needed for the case when aspects are depending on java code [Example requested for AspectJ postcompile weaving] for the case when aspects are depending on java code (not found on examples) Jul 28, 2021
@adrian-n-balaban
Copy link
Author

Hello,
After converting from .aj to .java with annotations, and using postcompile plugin, incremental compiling works.
So, no need for the above request.
Thank you !

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant