This message was deleted.
# community-support
s
This message was deleted.
v
How does your settings script look like?
Can you share a build
--scan
?
l
Thanks for the quick response! I found that after I removed the
rootProject.name
in settings file the build (by clicking the gradle icon) was successed. But the import statement in class still showed red. I will try to fix it first and update later. thanks ag!
Hi Vampire, I want to confirm another question. It looks like gradle cannot support java-scala mixed project very well. Because in gradle compile DAG, the compileScala task depends on compileJava task, while in real projects, my java class could depens on the scala class in the same module. That will be a circle in compile path. Now my solution is moving all the java class files from
src/main/java
to
src/main/scala/
path and let the compileScala task to compile the java source code. Just want to know is there a better way to solve the problem? Thank you!
v
If you have a clear direction, so either Java code uses Scala code or Scala code uses Java code, you can define the order / dependency. But if you really have a big mixture with both, and the Scala compiler can do the joint compilation, it is probably fine to let it do it. But I have no experience at all with Scala. Alternatively to moving the Java files to the Scala source set, you could maybe just define the Java source directory for the Scala source set and change the Java source directory so that the Java compilation task has nothing to do.
l
Ah……yes I saw the proposal and also tried to change java source set. But that will cause another error, something like ‘java source set cannot be empty’, because some other modules could depends on the current javaCompile task
v
If it complains that the source set must not be empty, you should have the same problem when moving all source files over though