Run Command Using Either Gradle or Maven Depending on Project

Answered

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? 

0
1 comment

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

0

Please sign in to leave a comment.