-
Notifications
You must be signed in to change notification settings - Fork 90
Gradle setup works only with 5.x, 6.x but not with 7.x #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
And it does not work at all with Gradle 7+ |
Yeah I need to dive a bit deeper into this and see how we can get it to work with gradle 7+ |
All gradle 5 and 6 related issues should now be fixed with using latest version of AspectGradlePlugin with version 0.0.7 https://github.com/awslabs/aws-lambda-powertools-java/releases/tag/v1.9.0 |
@pankajagrawal16 still not working for me? Could we try https://docs.freefair.io/gradle-plugins/5.0.1/reference/#_aspectj instead? |
Hey, this is the plugin which I was going to look into, but i am not working this week, so will check once back. |
@pankajagrawal16 @msailes - i have created a PR to potentially fix the gradle plugin used for AspectJ |
@michaelbrewer It works with freefair gradle plugin. I have validated it and change is pretty simple. Would you mind validating it as well ? I am thinking we can officially update our docs to used free fair instead coz it seems to be actively maintained and works on gradle 5,6 and 7 as well |
This is what my sample build.gradle looks like for a sample hellp world gradle app via
|
Docs and cookiecutter projects are now update to use the new config which should work for all gradle versions 5, 6 and 7. cc @michaelbrewer Closing this now, Let me know if you face any issues. |
@pankajagrawal16 - FYI my PR for aspectj.AspectjGradlePlugin was merged |
woho.. nice.. then probably we have two ways of configuring gradle project. I am still in favor of keeping freefair now since its much more active. |
Yep, i agree, when i tried freefair initially i could not verify locally it was working (only when deployed) |
Gradle example provided works only when you are on gradle 5.x.
aspectj.AspectjGradlePlugin has to be pinned to version 0.0.3.
aspectj.AspectjGradlePlugin from version 0.0.4 is compiled on Java 12. Which makes plugin incompatible to use with lambda functions on runtime lower than Java 12.
Also version 0.0.3 had a bug which made it incompatible to work both on gradle versions 5.x and 6.x. Although this is now fixed in version 0.0.5, but the versions above 0.0.4 of plugin can only work with java 12 or above.
Here is the open issue to make plugin work with Java 11 or lower.
What were you trying to accomplish?
Expected Behavior
Should work with gradle 6.x as well.
Current Behavior
Fails with error on gradle 6.x
Possible Solution
None as of now. Use gradle 5.x. with gradle 6.x users have to upgrade AWS lambda function runtime to Java 12 or above and use latest version of aspectj.AspectjGradlePlugin plugin.
Environment
The text was updated successfully, but these errors were encountered: