Closed Gamebuster19901 closed 2 years ago
Two comments:
core/build.gradle.kts
file?includeBuild …
. You’ll also have to rename the root project.Two comments:
- Why not change the name of the core project in the
core/build.gradle.kts
file?- This fix won’t work. Gradle won’t be able to differentiate between the root project and core failing during dependency resolution when including the project using
includeBuild …
. You’ll also have to rename the root project.
For 1, I kept getting the error Val cannot be reassigned
.
As for number 2, the user in discord isn't able to include the project using de.gurkenlabs:litiengine
, shouldn't it automatically import subprojects if litiengine
is included? It seems like changing the name of core
should be unnecessary, as it should already come with litiengine
.
For 1, I kept getting the error
Val cannot be reassigned
.
I forgot, the name needs to be changed in core/settings.gradle.kts
As for number 2, the user in discord isn't able to include the project using
de.gurkenlabs:litiengine
, shouldn't it automatically import subprojects iflitiengine
is included? It seems like changing the name ofcore
should be unnecessary, as it should already come withlitiengine
.
It’s a tricky situation really. Indeed gradle sees the core project but it won’t consider it when resolving dependencies. When declaring de.gurkenlabs:litiengine
as an implementation
dependency you request gradle to look for a module with group de.gurkenlabs
and name litiengine
which provides a java runtime configuration i.e a compatible jar file. Gradle will indeed find a project with the matching group and name namely the litiengine root project. But the root project doesn’t specify a java runtime configuration. In fact it doesn’t specify any configuration at all. Gradle then won’t go on to check any sub-projects because for one their names don’t match the dependency request and for another depending on a project doesn’t imply depending on the sub-project. The project hierarchy is merely for configuration purposes and isn’t mirrored on the configuration/dependency side of things. I hope this clears up the situation :)
Dependents should now be able to use
implementation 'de.gurkenlabs:litiengine:VERSION'
once again, instead ofimplementation 'de.gurkenlabs:core:VERSION
.I don't have a project to test these changes on, please test before merging.