Tell me, what am I doing wrong? Here’s the project...
# gradle
b
Tell me, what am I doing wrong? Here’s the project:
<https://github.com/BorzdeG/samples-kotlin-subprojects>
Here’s the command:
./gradlew classes
As a result I get this error:
Copy code
e: $PROJECT_DIR/client/src/main/kotlin/demo/client/Client.kt: (3, 20): Unresolved reference: CoreModel
e: $PROJECT_DIR/client/src/main/kotlin/demo/client/Client.kt: (9, 12): Unresolved reference: CoreModel
> Task :client:compileKotlin FAILED
g
Just looks that CoreModel is not available in compile time, check import and dependencies
b
IDEA does not swear on dependencies. And in the console shows that the dependency is available:
Copy code
compile - Dependencies for source set 'main' (deprecated, use 'implementation ' instead).
\--- project :common
     \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.2.40

compileClasspath - Compile classpath for source set 'main'.
+--- project :common
g
But CoreModel doesn’t look like Kotlin depenendency, maybe it’s your own class. Also, you can try to share sample project
b
Sample project in the first message - shared on GitHub CoreModel is my data class from the “common” subproject
common module is not like other (platform) modules, You cannot just use it as “compile” dependency, you must specify that current module implements platform for this common module, so use expectedBy
b
thx!