So I have tried to add my local .jar file dependency to my build.gradle file:
apply plugin: \'java\'
sourceSets {
main {
java {
srcD
You can add jar doing:
For gradle just put following code in build.gradle
:
dependencies {
...
compile fileTree(dir: 'lib', includes: ['suitetalk-*0.jar'])
...
}
and for maven just follow steps:
For Intellij: File->project structure->modules->dependency tab-> click on + sign-> jar and dependency->select jars you want to import-> ok-> apply(if visible)->ok
Remember that if you got any java.lang.NoClassDefFoundError: Could not initialize class
exception at runtime this means that dependencies in jar not installed for that you have to add all dependecies in parent project.