If I were to make a Kotlin Library project, how wo...
# getting-started
j
If I were to make a Kotlin Library project, how would I later on go about using it in a Kotlin Application project?
m
I publish my libraries to https://jitpack.io/. Then you can import them in other projects via gradle. Here is a relatively small sample project of mine: https://github.com/MaaxGr/KotlinUtils Maybe you want to take a look, how i implemented it, be looking at: • README for usage info • build.gradle for JAR Task that is neccessary to get published on jitpack
j
Thanks! I'll take a look What if I don't want to publish it anywhere and just use it locally?
m
This easiest way would be to build a jar file, put the jar in e.g. a libs folder of your application that wants to use the lib and add the following dependency to build.gradle
Copy code
dependencies {
    implementation files('libs/something_local.jar')
}
j
I see. Thanks for the suggestion