You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Buildship downstream dependencies need to directly interact with the Gradle build. They want to extract arbitrary information from the build, query available tasks and run them. The Tooling API offers the necessary services to do that. Buildship already relies on this TAPI functionality, but there’s no convenient way to do the same for the dependencies.
Design
The ProjectConnection Tooling API interface contains all the methods to query models and execute build invocations. Buildship should expose a method on GradleBuild with a ProjectConnection instance. Buildship should take care of the connection initialization and cleanup.
Classes
GradleBuild should have a new ``withConnection()` method that provides a reference to the project connection.
The project connection should be a proxy so that all long-running operations (ModelBuilder, BuildLauncher, and TestLauncher) created by it are already pre-configured with correct inputs, outputs, progress loggers, etc.
Switching to a different Gradle distribution can be done by creating a new GradleBuild object with a new Gradle version and calling withConnection(). Without calling synchronize() it won’t have any effect to the workspace.
The LongRunningOperation interface only supports setting arguments and jvm arguments, there’s no way to read or append the existing list. This means Buildship can’t preconfigure the operation and let the client manipulate the list. This makes the custom model injection impossible via an init script impossible. We have to introduce those methods to implement this story. Also, we should consider deprecating the withArguments and withJvmArguments as they have an identical implementation to setArguments and setJvmArguments.
We should add explicit documentation how a custom model can be queried via this API. As part of that, we should document how can a client load an init script location from a plugin jar.
The text was updated successfully, but these errors were encountered:
Overview
The Buildship downstream dependencies need to directly interact with the Gradle build. They want to extract arbitrary information from the build, query available tasks and run them. The Tooling API offers the necessary services to do that. Buildship already relies on this TAPI functionality, but there’s no convenient way to do the same for the dependencies.
Design
The ProjectConnection Tooling API interface contains all the methods to query models and execute build invocations. Buildship should expose a method on
GradleBuild
with a ProjectConnection instance. Buildship should take care of the connection initialization and cleanup.Classes
GradleBuild
should have a new ``withConnection()` method that provides a reference to the project connection.The project connection should be a proxy so that all long-running operations (
ModelBuilder
,BuildLauncher
, andTestLauncher
) created by it are already pre-configured with correct inputs, outputs, progress loggers, etc.Use cases
Querying available tasks
Launching tasks
Launching tests
Custom model loading
Test coverage
withConnnection()
.Additional notes
GradleBuild
object with a new Gradle version and calling withConnection(). Without calling synchronize() it won’t have any effect to the workspace.LongRunningOperation
interface only supports setting arguments and jvm arguments, there’s no way to read or append the existing list. This means Buildship can’t preconfigure the operation and let the client manipulate the list. This makes the custom model injection impossible via an init script impossible. We have to introduce those methods to implement this story. Also, we should consider deprecating thewithArguments
andwithJvmArguments
as they have an identical implementation tosetArguments
andsetJvmArguments
.The text was updated successfully, but these errors were encountered: