I canβt offer you a solution to keep all your Gradle project settings intact, but if you find the following useful, check it accordingly.
To move between the two build tools, you can do the following:
If you have a Maven project that you want to convert, you need to go to the project folder, and on the cmd line run "gradle init" (obviously, make sure Gradle is in your path). Close and reopen the project, and you will be prompted to enable Gradle in the project.
To your exact question, about converting Gradle back to Maven. You can simply delete the .idea folder, leaving all Gradle scripts in place. Then inside Intellij, select an open project. Go to your pom.xml and select this. Follow the screens below. When Intellij prompts you to include the project as Gradle, reduce it. The result is a new project in which your Gradle scripts will still be included, but now they are built with Maven. You will need to have a valid pom.xml that maven can use.
source share