Why compileKotlin can't find dependencies

Github

I’m including two module from files by gradle

But I can’t use the functions from it.

There is the error

> Task :compileKotlin FAILED
e: E:\Sponge\sponge-template\src\main\kotlin\org\example\spongetemplate\SpongeTemplate.kt: (4, 36): Unresolved reference: registerListener
e: E:\Sponge\sponge-template\src\main\kotlin\org\example\spongetemplate\SpongeTemplate.kt: (14, 25): Unresolved reference: registerListener

https://gradle.com/s/bdhpq7lxjnbio

I can’t check out your project https://github.com/SettingDust/sponge-template/tree/kotlin-laven: laven-sponge is an empty directory.

It’s a git submodule. Not empty. Try to run git submodule update --init --recursive?

Thank you, reproduced. When I remove mentions of publishing, shadowJar, jar in laven-sponge build file, the project starts to build. Looks like this is not Kotlin-related, maybe a shadowing issue.

Is it a issue caused by the shadow in submodule?

I think so. Try to remove shadowing from the build file.

Alright. Thanks a lot

Fixed by 🐛 Fix unresolved reference caused by shadow · SettingDust/laven-sponge@0f85149 · GitHub