سؤال

I'm using the idea plugin on a Gradle multiproject configuration to generate the Intellij configuration files. At the moment the build is working fine in Gradle, but it gives me errors on the IDE due to the missing JPA Metamodel source files.

My question is, how can I place the generated .java files in a different folder and set them as a source folder for the modules in Intellij?

Currently I'm trying to send the parameter -s to javac but I keep getting the error invalid flag: -s...

هل كانت مفيدة؟

المحلول

Depending on how you want the generated source files to be compiled, the solution may be as simple as adding the source files to the main source set:

sourceSets.main.java.srcDir "build/generated-files" // adapt as necessary

Additionally, compileJava will need to depend on the task that generates the sources.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top