简体   繁体   中英

Multiple steps for spotless format java error while gradle build

There is an IntelliJ project using Gradle, Java and in one of the modules, I put the Java code which is working independently. But on moving the code within this project and running the build.gradle I am getting the following error:

Could not create task ':wlcr-auto-api:spotlessJavaApply'. Could not
create task ':wlcr-auto-api:spotlessJava'. Multiple steps with name
'google-java-format' for spotless format 'java'

I am not sure what is the reason for this error. Also, I am not sure if the project structure is correct in Intellij.

在此处输入图像描述

In the above image auto is the project that was already created. I created a new module auto-api and put all my code inside it. There is an Application.java inside it, the main file to run the spring boot application. It works when the code is not put inside this auto project. But not when included in the project.
I have no clue how to debug this.

check out your build.gradle - probably you missed something inside block:

spotless {
    ...
}

at least, if you simply remove it - the issue will gone

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM