I have a gradle build script similar to:
apply plugin: 'war'
task genSources << {
  // here I generate some java files
}
// making sure that source files are generated
// before compilation
compileJava.dependsOn(genSources)
How can I make the files gene开发者_高级运维rated in genSources compile along with files in src/main/java during compileJava?
You may try adding the path to the generated sources like this:
sourceSets {
    main {
        java {
            srcDir '<path to generatedJava>'
        }
    }
}
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论