Using the tolling API from a build script

You can use the tooling API, like ‘org.gradle.tooling.BuildLauncher’ from within a build script. I use this together with the tomcat plugin, to restart with debug port open.

Since the tooling API is meant for tooling like IDE integration, I wonder are there any disadvantages when using it from within a build script. Or is it general bad practice and might be deprecated or something else one should consider when using it within a build script?

I’d say it’s a bit unusual, but I can’t think of any concrete problems.