I am trying to keep multiple revisions of a file in different source directories. So, that they can be referenced quicky with the ongoing discussion.
We are using intellij. And the challenge is, we can not have multiple files with same fully qualified class name.
So, I was thinking to have multiple source directories with multiple output directories to avoid any clash of fqns.
And we are trying to achieve this with the help of build.sbt.
Note : We just need this setup for teaching and executing java files from intellij. We really not looking for building jar and other things. Also, I know that I can use git commits also for this, but I still want to try sbt approach.
Please find simplified project with simplified build.sbt.
I am able to assign different classDirectory for different source directories (see console output in screenshot), but intellij is not generating class in new class directories.
I am trying to keep multiple revisions of a file in different source directories. So, that they can be referenced quicky with the ongoing discussion.
We are using intellij. And the challenge is, we can not have multiple files with same fully qualified class name.
So, I was thinking to have multiple source directories with multiple output directories to avoid any clash of fqns.
And we are trying to achieve this with the help of build.sbt.
Note : We just need this setup for teaching and executing java files from intellij. We really not looking for building jar and other things. Also, I know that I can use git commits also for this, but I still want to try sbt approach.
Please find simplified project with simplified build.sbt.
I am able to assign different classDirectory for different source directories (see console output in screenshot), but intellij is not generating class in new class directories.
Please find below simplified build.sbt :-
Simplified project can be accessed from below github url :-
https://github.com/moglideveloper/sbt-source-directories
Stackoverflow link :- https://stackoverflow.com/questions/72858786/sbt-source-directories-with-separate-soutput-directories-to-avoid-class-fqn-conf
Kindly suggest if sbt-ide-settings (or some other approach) can be used to resolve this.