Eclipse Buildship: Eclipse Plug-ins for Gradle 3.0.0 Release Review

Type
Release
State
Successful
End Date of the Review Period

Reviews run for a minimum of one week. The outcome of the review is decided on this date. This is the last day to make comments or ask questions about this review.

Release

3.0.0

Description

New And Noteworthy

Improved project synchronization

Buildship can now import projects even if their configuration is broken. In that case, the root project is imported as-is. Also, instead of using a custom error dialog, synchronization issues are shown via error markers. In case a location information is present in the error, Buildship assigns the error marker to the proper resource.

New APIs

Buildship 3.0 now offers a stable API for downstream dependencies manage Gradle projects programmatically. The API has the following components:

1) Project Synchronization API

This API lets Eclipse plugins programmatically import and synchronize Gradle projects with the workspace. To import a new project, clients need to declare a build configuration and use it to obtain a reference to the Gradle build and execute the project synchronization:

BuildConfiguration configuration = BuildConfiguration

    .forRootProjectDirectory(new File("path/to/project"))

    .overrideWorkspaceConfiguration(true)

    .gradleDistribution(GradleDistribution.forVersion("4.10.2"))

    .autoSync(true)

    .build();

GradleWorkspace workspace = GradleCore.getWorkspace();

GradleBuild newBuild = workspace.createBuild(configuration);

newBuild.synchronize(monitor);

For existing projects, the Gradle build reference can be returned via the getBuild() method:

IProject project = ...

GradleBuild existingBuild = workspace.getBuild(project).get();

existingBuild.synchronize(monitor);

2) Task Execution API

This API exposes all Tooling API functionality. Clients can enumerate and execute tasks, inspect the configuration of the current build and more. The provided connection instances are preconfigured to re-use Buildship resources (views, inputs, outputs, cancellation, etc.) for the Gradle invocations. Here's an example of how to execute a task:

IProject project = ...;

GradleWorkspace workspace = GradleCore.getWorkspace();

GradleBuild build = workspace.getBuild(project).get();

build.withConnection(connection -> connection.newBuild().forTasks("build").run(), monitor)

 

3) Project configurators

This is an extension point, via which external plugins can hook into Buildship synchronization logic and can provide additional configuration to each workspace projects. The required interface is quite simple:

public interface ProjectConfigurator {

    void init(InitializationContext context, IProgressMonitor monitor);

    void configure(ProjectContext context, IProgressMonitor monitor);

    void unconfigure(ProjectContext context, IProgressMonitor monitor);

}

The context objects provide access the current Gradle build, the project being configured and the helper objects to report configurator errors. 

Complete import configuration attributes 

Buildship 3.0 now offers all configuration options on all preference levels. Users can set the Gradle user home, JVM arguments and more for the entire workspace, for a specific Gradle build or for a single task execution.

 

Announcement: https://discuss.gradle.org/t/buildship-3-0-is-now-available

Update site: https://download.eclipse.org/buildship/updates/e410/releases/3.x/3.0.0.v20181205-1821

API Certification

The project leadership certifies that the APIs in this release are "Eclipse Quality".

Security Issues

There are no known security issues.

Conforms To UI/UX Guidelines
Yes (document review in detail)
End of Life

Buildship will be developed and maintained in the foreseeable future.

Communities

We have an active community on GitHub and on the Gradle forum.

This release is part of Eclipse IDE 2018-12