Skip to main content
  • Log in
  • Manage Cookies
projects.eclipse.org
Download
  • Projects
  • Working Groups
  • Members
  • Community
    • Marketplace
    • Events
    • Planet Eclipse
    • Newsletter
    • Videos
    • Blogs
  • Participate
    • Report a Bug
    • Forums
    • Mailing Lists
    • Wiki
    • IRC
    • Research
  • Eclipse IDE
    • Download
    • Learn More
    • Documentation
    • Getting Started / Support
    • How to Contribute
    • IDE and Tools
    • Newcomer Forum
  • More
      • Community

      • Marketplace
      • Events
      • Planet Eclipse
      • Newsletter
      • Videos
      • Blogs
      • Participate

      • Report a Bug
      • Forums
      • Mailing Lists
      • Wiki
      • IRC
      • Research
      • Eclipse IDE

      • Download
      • Learn More
      • Documentation
      • Getting Started / Support
      • How to Contribute
      • IDE and Tools
      • Newcomer Forum
    • Search

  1. Home
  2. Projects
  3. Eclipse Tools Project
  4. Eclipse Buildship: Eclipse...
  5. 3.0.0

Eclipse Buildship: Eclipse Plug-ins for Gradle 3.0.0

Primary tabs

  • Overview(active tab)
  • Release Plan
  • Review Information

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

Release Date: 
Wednesday, December 5, 2018
This release is part of Eclipse IDE 2018-12.
Review: 
3.0.0 Release Review
Release Type: 
Major release (API breakage)

Project Links

  • Summarize Bugs
  • Dev docs
  • View Help wanted Bugs
  • Build docs
  • Getting Started
  • Stories
  • View Open Bugs
  • Report a Bug
  • Website
Eclipse Buildship: Eclipse Plug-ins for Gradle

Related Projects

Project Hierarchy:

  • Eclipse Tools Project
  • Eclipse Buildship: Eclipse Plug-ins for Gradle

Tags

Build Technologies
  • Gradle
Other Tags
  • gradle
  • build
  • buildship

Eclipse Foundation

  • About Us
  • Contact Us
  • Sponsor
  • Members
  • Governance
  • Code of Conduct
  • Logo and Artwork
  • Board of Directors
  • Careers

Legal

  • Privacy Policy
  • Terms of Use
  • Copyright Agent
  • Eclipse Public License
  • Legal Resources

Useful Links

  • Report a Bug
  • Documentation
  • How to Contribute
  • Mailing Lists
  • Forums
  • Marketplace

Other

  • IDE and Tools
  • Projects
  • Working Groups
  • Research@Eclipse
  • Report a Vulnerability
  • Service Status

Copyright © Eclipse Foundation. All Rights Reserved.

Back to the top