Skip to content
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

The gradle build failed after adding spring.javaformat #1437

Closed
fupfin opened this issue Jan 29, 2024 · 2 comments
Closed

The gradle build failed after adding spring.javaformat #1437

fupfin opened this issue Jan 29, 2024 · 2 comments

Comments

@fupfin
Copy link

fupfin commented Jan 29, 2024

After adding spring. javaformat to gradle gradle build started to fail at task checkFormatAot.

The output is something like this.

> Task :compileAotJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :checkFormatAot FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkFormatAot'.
> Formatting violations found in the following files:
   * build/generated/aotSources/org/springframework/transaction/annotation/AbstractTransactionManagementConfiguration__BeanDefinitions.java
   * build/generated/aotSources/org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration__BeanDefinitions.java
   * build/generated/aotSources/org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration__Autowiring.java
   * build/generated/aotSources/org/springframework/context/event/EventListenerMethodProcessor__BeanDefinitions.java
   * build/generated/aotSources/org/springframework/context/event/DefaultEventListenerFactory__BeanDefinitions.java
   * build/generated/aotSources/org/springframework/cache/annotation/ProxyCachingConfiguration__BeanDefinitions.java
   * build/generated/aotSources/org/springframework/cache/annotation/ProxyCachingConfiguration__Autowiring.java
   * build/generated/aotSources/org/springframework/cache/jcache/config/AbstractJCacheConfiguration__BeanDefinitions.java
   * build/generated/aotSources/org/springframework/cache/jcache/config/ProxyJCacheConfiguration__BeanDefinitions.java
   * build/generated/aotSources/org/springframework/cache/jcache/config/ProxyJCacheConfiguration__Autowiring.java
   * build/generated/aotSources/org/springframework/boot/context/properties/ConfigurationPropertiesBinder__BeanDefinitions.java
@dsyer
Copy link
Member

dsyer commented Jan 29, 2024

Thanks. I tried to fix it, but failed. Rolled back the changes (leaving them in comments): 4ad3b4e. Pull requests welcome.

UPDATE: another commit on main that brings back javaformat but banishes checkstyle. Checkstyle is only used by the maven build to check for http URLs (I think), so we need the configuration for that in gradle to get the two builds to be comparable.

@ThomasPerkins1123
Copy link
Contributor

Sorry I missed this I was testing with ./gradlew assemble. It turns out that this was a little more complicated than I initially expected but I have a PR now which should make this work.
#1444

@dsyer dsyer closed this as completed Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants