I'd like to compile a project which contains a java source generator and then compile the generated code within a single project. I.e: compile Generator.scala, run Generator.generate(outputDir), compile outputDir, package into a jar. I'm trying this:
sourceGenerators in Compile <+= sourceManaged in Compile map { out =>
Generator.generate(out / "generated")
}
but sbt complains
[error] Build.scala:1: object example is not a member of package org
[error] import org.example.Generator
Basically, sbt doesn't see Generator defined in the project it compiles. Is it possible to do it my way with sbt?