I am using Java 17 with IntelliJ 2023.2.2 and attempting to configure the Gradle Spotless plugin to replace
import java.util.*
with individual class imports, such as
import java.util.List;
import java.util.Map;
The post I found Remove unused imports from java project using gradle suggests using an external Eclipse config to handle this, but since I only use IntelliJ and not Eclipse, I wonder if it's possible to configure IntelliJ's code style XML to replace the .* imports. Additionally, I would like the Spotless plugin to sort the fields and methods by name. Is this possible?
I have tried various configurations, but none of them worked.