Hi guys! So I'm building this library I want to te...
# getting-started
m
Hi guys! So I'm building this library I want to test in a different project locally. I published the artifacts to the local maven repo (.m2/repository) and added the dependency in my build script. The build runs correctly and I can actually start the other project (which is a server-side app), but I'm unable to actually import the library (e.g. import xyz.daimones.ktor.Class;). What could I be doing wrong?
s
Did you forget to add mavenLocal() in dependencyResolutionManagement block? it should be in settings.gradle.kts
m
I added it
s
the artifacts do exist in the .m2 repository?
i suppose so
m
They exist. The package is also listed in the external deps section. I notice some differences with a dep like exposed. With exposed, I can see the top-level package (e.g. org.jetbrains.exposed)
Screenshot_2025-06-04_04-42-27.jpg
My own package/library instead goes on to list the files inside the folder without any top-level package
Could that be a reason?
s
i don’t think so
could you share your project? maybe a github link
m
See
Will share the project
Let me update
s
seems like the package is successfully imported?
m
Still can't import it
I can't do
import xyz.daimones.ktor.admin.Admin
s
it might have something to do with what u mentioned
m
Yeah
👍 1
r
check the proguard rules, maybe it removed your files
m
@Robert Levonyan how do I check tat?
r
In the library project open
<http://proguard-rules.pro|proguard-rules.pro>
file and try to add your xyz.daimones.ktor.Class, then publish a new version of your library, add to the demo project and try to import your class
m
No worries
It works now
👍 2
I managed to fix the top-level directory