Run Command Using Either Gradle or Maven Depending on Project
已回答
I currently have a plugin which runs a gradle task as an action using the method described here.
Is it possible to somehow detect which build tool a project is using, so I could automatically execute either the Gradle task or its equivalent Maven task respectively?
请先登录再写评论。
Nothing would prevent a project to use both Maven and Gradle simultaneously - in different modules.
You can check for Gradle using
ExternalSystemApiUtil.isExternalSystemAwareModule(GradleConstants.SYSTEM_ID, Module)
and for Maven
org.jetbrains.idea.maven.utils.MavenUtil#isMavenModule