Skip to content

Conversation

@LexManos
Copy link
Member

@LexManos LexManos commented Feb 3, 2026

This is to address #1038
The eclipse runs were not using the correct directories.

Basically, because I didn't want to figure out how to pass in the eclipseModel to a task. I do all the work at configuration time.
But also this is called during afterEvalute because thats when MinecraftDependency.handle is called.
That needs to be fixed, as only validation should be happening in afterEvaluate, but thats a bigger thing for later.

I deleted getEclipseOutputDir because it is part of the internal api, and thus not what I consider a breaking change.
In its place, i grab the EclipseModel as needed.
From the EclipseModel I use:

  • sourceSets
  • baseSourceOutputDir
  • defaultOutputDir

From SourceSet I use:

  • name
  • output.resourcesDir
  • output.classesDirs

This works for now, if this looks sane enough to you @Jonathing pull.

Copy pasting some relevant details form discord:
Okay so The EclipseClasspath task uses the EclipseModel. Which includes SourceFolder entries.
These entries have a 'output' value which is set via SourceFoldersCreator
Who collectSourceSetoutputPaths function basically just does:

path = base + '/' + sourceSet.name
while (claimed.contains(path)) path += '_'
return path

Easy enough to mimic. Except for the base part. That is gotten from EclipseClasspath.getBaseSourceOutputDir, relativzed to the project directory.
Which for completeness sake, defaults to project.dir("bin")

This is all simple enough if we can figure out how to pass in the EclispeModel and sourceSets into the task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant