Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
400 views
in Technique[技术] by (71.8m points)

sbt - How to find out if invoking the compile task actually compiled anything

I want to generate some Scala source code in my sbt build. I wrote the code generator as a subproject in my sbt build and added a Compile / sourceGenerators line to the main project settings that will invoke the code generator's run task. I also made sure I only invoke the run task when the code generator's input files have changed.

The thing is: not only the code generator's inputs can change, but also the code generator itself. I would therefore like to invoke the code generators compile task and see if anything had to be recompiled. If that's the case, I want to run the code generator again. Is this possible to do? The compile task returns a CompileAnalysis object, but how can I find out from this object if anything was recompiled?

question from:https://stackoverflow.com/questions/65862549/how-to-find-out-if-invoking-the-compile-task-actually-compiled-anything

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...