plugins {
id "org.xbib.gradle.plugin.jflex" version "1.7.0"
}
repositories {
mavenCentral()
}
def copyJflex = tasks.register("copyJflex", Copy) {
from 'src/main/custom/'
into "${project.buildDir}/generated/sources/custom/jflex/"
}
sourceSets {
main {
jflex {
srcDir copyJflex
}
}
}
The main Jflex SourceDirectorySet should contains copyJflex output, however this is not the case.
In fact the generateJflex task doesn't consider copyJflex as a dependency, so running generateJflex won't trigger copyJflex task and will produce nothing.
Expected behavior
The generateJflex task should depend on the copyJflex task.
Running the generateJflex task should trigger the copyJflex task and its output processed by Jflex.
Problem description
If Jflex input is defined as the output of another task, this will not be taken into account by Jflex tasks.
An example can be found in stalb/JFlex_Example2:
The main Jflex SourceDirectorySet should contains
copyJflex
output, however this is not the case.In fact the
generateJflex
task doesn't considercopyJflex
as a dependency, so runninggenerateJflex
won't triggercopyJflex
task and will produce nothing.Expected behavior
generateJflex
task should depend on thecopyJflex
task.generateJflex
task should trigger thecopyJflex
task and its output processed by Jflex.