Please forgive my ignorance. I’m an old coder and I don’t grok build systems. A dev contributed a gradle build file and it caused a “multiple inclusions” warning. I’m trying to migrate away from using pom.xml. I’m having troubles with which google can’t help.
You are trying to set up a multi-project build with this structure:
makelangelo
|- java
Your settings.gradle should include your ‘java’ subproject.
include 'java'
Also, the build.gradle file for the java project seems to have been accidentally moved to the top-level of the repo. Also, don’t check in the .gradle directory, those are just local caches.
I moved build.gradle to /java, and added the “include ‘java’” line. After refresh Eclipse doesn’t recognize my source and won’t build or run. On refresh gradle project I get
org.eclipse.buildship.core.GradlePluginsRuntimeException: Cannot include existing Eclipse project Makelangelo.
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceOperations.includeProject(DefaultWorkspaceOperations.java:199)
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.addExistingEclipseProjectToWorkspace(DefaultWorkspaceGradleOperations.java:209)
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.synchronizeNonWorkspaceProject(DefaultWorkspaceGradleOperations.java:191)
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.synchronizeGradleProjectWithWorkspaceProject(DefaultWorkspaceGradleOperations.java:109)
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceGradleOperations.synchronizeGradleBuildWithWorkspace(DefaultWorkspaceGradleOperations.java:70)
at org.eclipse.buildship.core.workspace.SynchronizeGradleProjectJob.runToolingApiJobInWorkspace(SynchronizeGradleProjectJob.java:71)
at org.eclipse.buildship.core.util.progress.ToolingApiWorkspaceJob$1.run(ToolingApiWorkspaceJob.java:74)
at org.eclipse.buildship.core.util.progress.ToolingApiInvoker.invoke(ToolingApiInvoker.java:54)
at org.eclipse.buildship.core.util.progress.ToolingApiWorkspaceJob.runInWorkspace(ToolingApiWorkspaceJob.java:71)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.IllegalStateException: Workspace already contains a project with name Makelangelo.
at com.google.common.base.Preconditions.checkState(Preconditions.java:150)
at org.eclipse.buildship.core.workspace.internal.DefaultWorkspaceOperations.includeProject(DefaultWorkspaceOperations.java:179)
… 10 more
It also seems to be hiding my java/ folder from me in Eclipse, tho the folder is still on disk.
I was able to import the project into Eclipse with Buildship without incident when I checked out ad3f317
I think you need to cleanup your workspace. Also due to the way you have setup the project, Java is a sub module but will show up as a top level project in the Eclipse workspace.
As far as I can tell, the build was working, just that your eclipse workspace needed to be clean up. The easiest thing to do is to create a new workspace instead of trying to fiddle with the existing one if you don’t know what to do.
And to say the last part another way, eclipse won’t display the Java folder as a folder with in the Makelangelo project, but as a separate project named Java