Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generated sources to published source artifact #239

Closed
armanbilge opened this issue Apr 3, 2022 · 0 comments · Fixed by #252
Closed

Add generated sources to published source artifact #239

armanbilge opened this issue Apr 3, 2022 · 0 comments · Fixed by #252

Comments

@armanbilge
Copy link
Member

This is an easy gotcha. Found in the cats build, and I recently added something like this to one of my own projects.

lazy val includeGeneratedSrc: Setting[_] = {
  Compile / packageSrc / mappings ++= {
    val base = (Compile / sourceManaged).value
    (Compile / managedSources).value.map { file =>
      file -> file.relativeTo(base).get.getPath
    }
  }
}

I am genuinely curious if there's a situation where you don't want this.

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

Successfully merging a pull request may close this issue.

1 participant