qlitzler
03/06/2018, 10:03 AMEvgeniy Zaharov
03/06/2018, 10:26 AMbuild.gradle
dependencies example:
module1(common):
- empty dependencies
module2(common):
- compile project(':module1')
module3(jvm target)
- expectedBy project('module2')
As a result in module 3 there is no classes from module 1.
Do I have any mistakes (gradle 4.6, java 1.8_144)?qlitzler
03/06/2018, 10:29 AMimplementation project(':module1')
in module 3Evgeniy Zaharov
03/06/2018, 10:55 AMmodule 2
is not compiled, because not find classes from module 1
, but in IDEA all not highlighting by red, but also not compile.
I have try to change compile
in module 2 to implementation
, but it doesn’t help. Also I try to add both implementation
and compile
to module 2, but it doesn’t help.ilya.gorbunov
03/06/2018, 1:07 PMmodule1
and module2
with module3
, you need to declare two expectedBy
dependencies. This is prohibited now to have more than one expectedBy
, but soon this restriction will be lifted.Evgeniy Zaharov
03/06/2018, 1:31 PMexpect
classes? Or expect
classes may be only in “top” common module?ilya.gorbunov
03/06/2018, 2:12 PMexpect
classes can be in each common module, but every common module must be implemented by a platform module.module1
must be implemented by some jvm module too.
However just compiling common module2
that has a compile dependency on common module1
should be fine.
Are you sure these errors occur when compiling module2
and not module3
?Evgeniy Zaharov
03/07/2018, 8:00 AMmodule3
. I was confused by the error that there classes from module2
that do not find classes from module1
. But the error appears at the compilation stage of module3
ilya.gorbunov
03/07/2018, 1:27 PMcommon_nodes
and common_parser
with jvm_parser
on JVM. There's no way to do that in 1.2.30, but you can try the nightly build 1.2.40-dev-754 (https://bintray.com/kotlin/kotlin-dev/kotlin/1.2.40-dev-754) where multiple expectedBy
dependencies are supported.Evgeniy Zaharov
03/07/2018, 1:33 PMcompile project(':common_nodes')
to common_parser
and add both expectedBy
from common_nodes
and common_parser
to jvm_parser
?