If a project has a subproject, an iml file gets generated by ‘idea’ task, but it’s not removed by ‘cleanIdea’
The iml file should be deleted. I just checked this behaviour with the latest Version of Gradle. Can you provide a reproducible example? Which Gradle version are you using?