In my current project, I am utilizing Gradle's SourceSets to define JavaScript sources. However, I am facing a challenge in arranging the sources in a specific order. Ideally, I would like to have something along the lines of:
javascript.source {
custom {
js {
srcDir "src/js"
include "file2.js", "file1.js"
}
}
}
This way, I can ensure that the files are processed in the exact sequence as declared.
While I am aware that this can be achieved using a FileTree, I believe there might be a more streamlined approach when working with SourceSets.
If achieving ordered sources through SourceSets is not feasible, what alternative method should I consider for maintaining source file dependencies?
EDIT: It is crucial for me to maintain the order of sources due to the nature of JavaScript development.