How to collect errors after triggering the "build" action through the SDK in plugin?

Hello,

I want to find a way to get collect all errors (java compilation and dependencies) that happen during the build action triggered by my plugin.

Right now I am developing a plugin that works with the error outputs that we get after the compilation. Previously I've used CompilerManager.getInstance(project).compile(scope, callback), but it only works with java code, it does not do anything with the build.gradle that is in the project.

 

I've tried to use ProjectTaskManager.getInstance(project).buildAllModules(), but it does not provide the output in the result object.

Can anyone assist, please?

2

Gipnous have you figured out a solution?

0

Marcin I did not find a universal way to collect the errors. In my case, I run a GradleConnector and execute a command (assemble) and collect the errors.

Something like this:
GradleConnector.newConnector()
    .forProjectDirectory(${projectBasePath})
    .connect()
    .newBuild()
   .forTasks("assemble")
   .run();

1

请先登录再写评论。