So I have tried to add my local .jar file dependency to my build.gradle file:
apply plugin: \'java\'
sourceSets {
main {
java {
srcD
I couldn't get the suggestion above at https://stackoverflow.com/a/20956456/1019307 to work. This worked for me though. For a file secondstring-20030401.jar
that I stored in a libs/
directory in the root of the project:
repositories {
mavenCentral()
// Not everything is available in a Maven/Gradle repository. Use a local 'libs/' directory for these.
flatDir {
dirs 'libs'
}
}
...
compile name: 'secondstring-20030401'