Generating code that includes reading and writing files #5889
Closed
davesmith00000
started this conversation in
Development
Replies: 2 comments 1 reply
-
Writing to files in def readFile = Task.Source(BuildCtx.workspaceRoot / "read.txt")
def customSources = Task{
generateTheCode(Task.dest, readFile())
Seq(PathRef(Task.dest), readFile)
}
def generatedSources = Task{
super.generatedSources() ++ customSources()
} |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thanks for the assistance, I have it working now. Indigo can build games using Mill 1.x. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
As discussed on Discord, I've moved here to a discussion topic.
Context, I'm trying to port the Indigo plugin to Mill 1.x and I'm having issues.
I've (...very quickly...) produced a minimised example that roughly follows the process I have - so on the positive, this works - what I want to know now, is whether or not this is a reasonably idiomatic way to do this ...or not.
Is this the right idea?
/read.txt
foo/src/example/Main.scala
build.mill
Beta Was this translation helpful? Give feedback.
All reactions