https://kotlinlang.org logo
#korge
Title
# korge
a

arnis71

06/16/2020, 10:24 AM
Hey everyone, I am trying to fix an issue I've found with Android target https://github.com/korlibs/korge/issues/218. In short it does not include dependencies to other mp modules in generated Android project. Not with source sets nor with Gradle. Knowing this how can I fix it? Can anyone help me find a way to insert project dependencies into generated Android project?
adding project in build.gradle source sets fixes the problem but it seems too hacky
@Deactivated User what do you think?
d

Deactivated User

06/16/2020, 12:42 PM
Which line did you add in build.gradle to get it working?
a

arnis71

06/16/2020, 12:44 PM
Copy code
java.srcDirs += ["/Users/arnis/repos/space/game/src/commonMain/kotlin", "/Users/arnis/repos/space/game/src/androidMain/kotlin", "/Users/arnis/repos/space/data/src/commonMain/kotlin"]
last argument
I don't see any other way to fix this
gradle dependencies won't work because it is project inside the project and there is no way to reference the top level module in it
well there is a hack to do it but it requires to handle all dependant modules the certain way which is way worse than the sourceSets solution
d

Deactivated User

06/16/2020, 12:47 PM
I thought that the sourceSets were already set to that
Is because a submodule or something?
a

arnis71

06/16/2020, 12:49 PM
yes, it is a submodule on the same level as the korge module
you can see the hierarchy here https://github.com/arnis71/SpaceGame
d

Deactivated User

06/16/2020, 12:50 PM
I see. I think thats unsupported now. There is a TODO there
So something missing. But definitely that can be implemented
Please fill an issue at the korge-plugins repo
👌 1