Mustafa Ozhan
10/09/2020, 2:54 PMbackend
module into project as jvm
target but surprisingly backend Module is not seeing commonJvm
rather it sees commonAndroid
expected values. Also I can not reach the class in commonMain
from backend
module.
Did anyone had similar issue ?
You can see the gradle.kts files in threadAli Albaali
10/09/2020, 2:57 PMMustafa Ozhan
10/09/2020, 2:59 PMAli Albaali
10/09/2020, 3:09 PMMustafa Ozhan
10/09/2020, 3:09 PMAli Albaali
10/09/2020, 3:16 PMMustafa Ozhan
10/09/2020, 4:57 PMPeopleInSpaceApi
(located in commonMain
)
https://github.com/joreilly/PeopleInSpace/blob/master/common/src/commonMain/kotlin/com/surrus/common/remote/PeopleInSpaceApi.kt
can be reachable from backend
module should be some trick to achieve this, I created a new class in same file couldn’t reach itsergiocarabantes
10/10/2020, 9:49 AMMustafa Ozhan
10/10/2020, 12:40 PMJohn O'Reilly
10/10/2020, 1:53 PMMustafa Ozhan
10/10/2020, 2:16 PMcommonMain
classes in backend
module. Is there any trick for that ?
It seems we are having issues and backend
module only sees androidMain
for some reason.John O'Reilly
10/10/2020, 2:17 PMbackend
module gradle file but presume you probably something like that in your project as well?
implementation(project(":common"))
Mustafa Ozhan
10/10/2020, 2:25 PMimplementation(project(":common"))
but something is still missing,
On the other hand I download your repo,
you have PeopleInSpaceApi
class in commonMain
and you can use it in Server.kt
, tested working, I created TestCommon
class in same file couldn’t access it in Server.kt
So I started to wonder if there is any extra step to make commonMain
files visible in backend
moduleJohn O'Reilly
10/10/2020, 2:28 PMsergiocarabantes
10/10/2020, 2:31 PMJohn O'Reilly
10/10/2020, 2:32 PMMustafa Ozhan
10/10/2020, 2:37 PM4.2 Canary 13
and tested results are sameJohn O'Reilly
10/10/2020, 3:04 PMTestCommonMain
as option as I was typing it.....but....was able to add as import and could resolve it then
import com.surrus.common.TestCommonMain
Mustafa Ozhan
10/10/2020, 3:11 PMsergiocarabantes
10/10/2020, 3:55 PMMustafa Ozhan
10/10/2020, 4:52 PM