2

I have tried creating a lib folder added the jar file in the same folder. This what i have added in build.gradle

 compile fileTree(dir: './lib',include: ['*.jar'])

This is no lib folder by default in grails 3. I am not able to import classes from the jar file I would like to know what the proper way of adding external jar in grails 3.

  • 1
    Is this specific to intellij (as in: intellij can not find the class, but the code works fine standalone)? `compile fileTree(dir: 'lib', include: '*.jar')` is how it works (I doubt your little differences matter, but you could of course try) – cfrick Nov 15 '19 at 06:43
  • Thanks @cfrick yes i think its specific to intellij. after writing the full package name, intellij is suggesting class name. – vishal.kangralkar Nov 15 '19 at 07:17

1 Answers1

0

Shocked others haven't answered this.

repositories {
    flatDir {
        dirs 'lib'
    }
Orubel
  • 316
  • 4
  • 16