Skip to content

Commit

Permalink
Updates needed for versions without Gradle support
Browse files Browse the repository at this point in the history
  • Loading branch information
emasliukovas committed Dec 18, 2020
1 parent bd72d9c commit 5a8f7ec
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
11 changes: 11 additions & 0 deletions eclipse-mars/com.gocypher.cybench.eclipse.feature/category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/com.gocypher.cybench.eclipse.feature_1.0.0.qualifier.jar" id="com.gocypher.cybench.eclipse.feature" version="1.0.0.qualifier">
<category name="CyBench"/>
</feature>
<category-def name="CyBench" label="CyBench Tools">
<description>
The group contains the needed libriaries and execution components to create, run and analyze results of your own benchmarks with ease.
</description>
</category-def>
</site>
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.107.0",
org.eclipse.core.filesystem;bundle-version="1.5.0",
org.eclipse.e4.core.contexts;bundle-version="1.4.0",
org.eclipse.e4.core.di;bundle-version="1.5.0",
org.eclipse.buildship.core;bundle-version="3.1.4",
org.eclipse.buildship.ui;bundle-version="3.1.4",
org.eclipse.m2e.jdt;bundle-version="1.6.2"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: com.gocypher.cybench.plugin.tools
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
import org.eclipse.buildship.core.BuildConfiguration;
import org.eclipse.buildship.core.GradleBuild;
import org.eclipse.buildship.core.GradleCore;
import org.eclipse.buildship.core.GradleWorkspace;
//import org.eclipse.buildship.core.BuildConfiguration;
//import org.eclipse.buildship.core.GradleBuild;
//import org.eclipse.buildship.core.GradleCore;
//import org.eclipse.buildship.core.GradleWorkspace;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.runtime.CoreException;
Expand Down Expand Up @@ -339,15 +339,15 @@ private void updateDependenciesForNature (IJavaProject javaProject) throws Excep
Job job = new Job("Gradle dependency refresh") {
@Override
protected IStatus run(IProgressMonitor monitor) {
BuildConfiguration configuration = BuildConfiguration
.forRootProjectDirectory(new File(projectLocation))
.overrideWorkspaceConfiguration(true)
.autoSync(true)
.build();
GradleWorkspace workspace = GradleCore.getWorkspace();
GradleBuild newBuild = workspace.createBuild(configuration);
//TODO: get the progress monitor and set instead of null
newBuild.synchronize(monitor);
// BuildConfiguration configuration = BuildConfiguration
// .forRootProjectDirectory(new File(projectLocation))
// .overrideWorkspaceConfiguration(true)
// .autoSync(true)
// .build();
// GradleWorkspace workspace = GradleCore.getWorkspace();
// GradleBuild newBuild = workspace.createBuild(configuration);
// //TODO: get the progress monitor and set instead of null
// newBuild.synchronize(monitor);
return Status.OK_STATUS;
}

Expand Down

0 comments on commit 5a8f7ec

Please sign in to comment.