savvas
04/17/2024, 10:57 PMsourceSets {
androidMain {
dependencies {
implementation project(":module2")
}
}
}
doesn't work out of the box for some reason. the IDE can see the imports from module2 inside module1 and no compilation erros but when i try to build the app i get an Unresolved Reference
error
should this work out of the box (and thus i have made some sort of error in my module configurations) or am i missing something that i need to add to my gradle files?Jacob Ras
04/17/2024, 11:09 PMsavvas
04/17/2024, 11:32 PMsavvas
04/17/2024, 11:34 PMsavvas
04/17/2024, 11:34 PMPablichjenkov
04/17/2024, 11:37 PMmodule-2
depends on other modules that are not being loaded into the Appsavvas
04/17/2024, 11:37 PMsavvas
04/17/2024, 11:38 PMmodule-2
is a leaf node. doesn't depend on anything else πPablichjenkov
04/17/2024, 11:38 PMsavvas
04/17/2024, 11:39 PMPablichjenkov
04/17/2024, 11:39 PMsavvas
04/17/2024, 11:39 PMsavvas
04/17/2024, 11:40 PMsavvas
04/17/2024, 11:40 PMsavvas
04/17/2024, 11:41 PMPablichjenkov
04/17/2024, 11:41 PMPablichjenkov
04/17/2024, 11:47 PMsavvas
04/17/2024, 11:48 PMPablichjenkov
04/18/2024, 12:17 AMJacob Ras
04/18/2024, 8:23 AMJacob Ras
04/18/2024, 8:23 AMsavvas
04/18/2024, 8:25 AMsavvas
04/18/2024, 8:25 AMJacob Ras
04/18/2024, 8:25 AMsavvas
04/18/2024, 8:25 AMsavvas
04/18/2024, 8:25 AMJacob Ras
04/18/2024, 8:26 AMsavvas
04/18/2024, 8:27 AMJacob Ras
04/18/2024, 8:33 AMbuild.gradle
file to this build.gradle.kts
file:
plugins {
kotlin("multiplatform")
}
kotlin {
jvm()
}
After sync, the red import goes away. Project eventually fails to build because of JitPack's current incident, but it does get past the breaking point.
So the issue must be in your convention plugin. I'm no expert in those but at least this should be useful to know that the setup should work.savvas
04/18/2024, 8:35 AMsavvas
04/18/2024, 8:38 AMsavvas
04/18/2024, 8:39 AMsavvas
04/18/2024, 8:39 AMsavvas
04/18/2024, 8:40 AMsavvas
04/18/2024, 8:40 AMJacob Ras
04/18/2024, 8:48 AMsavvas
04/18/2024, 8:48 AMsavvas
04/18/2024, 8:49 AMJacob Ras
04/18/2024, 8:49 AMsavvas
04/18/2024, 8:53 AMsavvas
04/18/2024, 8:54 AMid 'java-library'
did the trick.savvas
04/18/2024, 8:54 AM