sbt / sbt/sbt-eclipse

Add some logic to the default value of EclipseKeys.createSrc

Open
#99 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Scala
Stars
712
Forks
163
PR merge metrics
No merged PRs in 30d

Description

This could be used to determine if source-managed should be added to the project's source roots:

EclipseKeys.createSrc <<= ((sourceGenerators in Compile) { sourgeGens =>
if(sourgeGens == Nil)
EclipseCreateSrc.ValueSet(EclipseCreateSrc.Unmanaged, EclipseCreateSrc.Source)
else
EclipseCreateSrc.ValueSet(EclipseCreateSrc.Unmanaged, EclipseCreateSrc.Source, EclipseCreateSrc.Managed)
})

Also I wish there was a setting such as :

EclipseKeys.createSrcDirs : TaskKey[Seq[File]]

By default this setting would feed on the output of the existing EclipseKeys.createSrc unchanged.
It would give a possibility to add or remove the directories that were generated
by EclipseKeys.createSrc. I would use it to remove directories like src/main/java, src/test/java when
they are empty.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing EclipseKeys.createSrc and sourceGenerators in Compile; the issue provides no file or test path to begin with. Done means deciding and implementing the conditional source-root behavior, plus determining whether a createSrcDirs setting can add or remove generated directories such as empty src/main/java and src/test/java.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.